Does anyone know of a way with C Shell that will work on both Linux and Sun to clear all leading and trailing blanks from a previously specified string? I am using the following code to replace blanks with underscores:
set Company = `echo $Company | sed 's/ /_/g
but I don't want any leading or trailing underscores. The string was originally defined using:
set COMPLine = `grep -i "COMPANY" $LASInputFile`
set Company = `echo $COMPLine | sed 's/^[^ ][^ ]* *\([^:][^:]*\)[ ][ ]*:.*/\1/'`
Thanks for any help