RE: Admin script has syntax errors...
Posted in 2001
You forgot to tell us what OS+Ver you are using, and what shell. -----Original Message----- From: Denmark B. Weatherburn [mailto:dweatherb@btl.net] Sent: Thursday, 04 January, 2001 1:00 AM To: Informix Users Group Subject: Admin script has syntax errors... Hello Listers, I downloaded some DBA scripts from the Internet; however, I'm having difficulty with one that supposed to arrange the data in a .unl file to line up the "|" field separators. The "beautify-unl.sh" script is called by another script that creates a ".unl" file with dbspace space information. This ".unl" file is used as an argument to the "beautify-unl.sh" script. I got two errors at first. One had to do with invalid parameters used with grep. I corrected it as follows: if ( echo $1 | grep $delim_pattern ) #if ( echo $1 | grep -q -e $delim_pattern ) The other error has to do with the syntax of awk commands: bbankmain{informix}/sfw/informix>./beautify-unl.sh cco.unl awk: syntax error near line 1 awk: bailing out near line 1 Here is an extract: awk -v myfs="$delim" ' # Inputs a pipe-delimited unl file and outputs it in a format so that # each column maintains its width. The result is that the delimited # columns appear straight and vertical. # BEGIN { ... I would appreciate any help identifying the correct syntax. Regards, Denmark W. "Knowledge is power, but it is only useful if it is shared!"