Your pipe fix is close, but pasted badly. The [ ] should be tab character in there. Since tab turns into spaces when pasting you could substitute [[:blank:]], like this: # Take the output of nm and produce a listing of raw symbols and C names global_symbol_pipe="sed -n -e 's/^.*[[:blank:]]\([AB...