On Mon, 1 Jun 2015 22:18:20 -0500, Bill Godfrey wrote:
>
>The "grep" and "awk" commands don't match \n to end-of-line on omvs, or on
>linux for that matter.
>
"awk" certainly does. To wit:
user@OS/390.24.00: cat awknl
#! /bin/sh -x
awk 'BEGIN {
String = "First line\nSecond line.\n"
# Show that "\n" is a line end.
printf( "%s", String )
# show that "\n" matches line end.
print( match( String, "\n" ) )
}'
user@OS/390.24.00: sh awknl
First line
Second line.
11
user@OS/390.24.00:
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN