On Wednesday 28 May 2008 16:48, Greg Freemyer wrote:
On Wed, May 28, 2008 at 7:31 PM, Randall R Schulz <rschulz@sonic.net> wrote:
...
Never mind.
I thought FS was supposed to be set at the shell level.
It had to be set inside the awk script.
Not necessarily. There's a command-line option to control the field separator:
-F fs --field-separator fs Use fs for the input field separator (the value of the FS predefined variable).
That was actually the first thing I tried. Could not get it to work. Then I read online somewhere that it was only a supported arg for legacy reasons and that the preferred usage was the FS variable.
Well, I don't know why the man page would be inaccurate (it doesn't refer one to the info pages for complete documentation), but I do know of a BASH-ism that I use frequently, the $'string' format: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Words of the form $'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard. Back-slash escape sequences, if present, are decoded as follows: \a alert (bell) \b backspace \e an escape character \f form feed \n new line \r carriage return \t horizontal tab \v vertical tab \\ backslash \' single quote \nnn the eight-bit character whose value is the octal value nnn (one to three digits) \xHH the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) \cx a control-x character -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
I have it working now, ...
Well, you can't argue with success...
Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org