hi
I'm using the bourne shell in BSD 4.2 and i'm getting wierd results when i use a wildcard in a simple awk script i'm running.
when i run:
awk '/d*/ {print $0 }' tmp2 it matches every line i have in that file even those that don't start with "d"
when i run: awk '/dr*/ { print $0 }' tmp2 i get
drwxr-xr-x 3 zion users 512 May 21 02:34 .
drwxr-xr-x 3 zion users 512 May 1 11:09 ..
drwxr-xr-x 2 zion users 512 May 18 14:08 t1
-rw-r--r-- 1 zion users 273 May 18 18:17 tweedle
-rw-r--r-- 1 zion users 49 Mar 28 22:49 wordlist
but when i run:
awk '/drw*/ { print $0 }' tmp2 i get a list of only directories? any one know why it is doing this?
tks
zion
<><
=-)
I'm using the bourne shell in BSD 4.2 and i'm getting wierd results when i use a wildcard in a simple awk script i'm running.
when i run:
awk '/d*/ {print $0 }' tmp2 it matches every line i have in that file even those that don't start with "d"
when i run: awk '/dr*/ { print $0 }' tmp2 i get
drwxr-xr-x 3 zion users 512 May 21 02:34 .
drwxr-xr-x 3 zion users 512 May 1 11:09 ..
drwxr-xr-x 2 zion users 512 May 18 14:08 t1
-rw-r--r-- 1 zion users 273 May 18 18:17 tweedle
-rw-r--r-- 1 zion users 49 Mar 28 22:49 wordlist
but when i run:
awk '/drw*/ { print $0 }' tmp2 i get a list of only directories? any one know why it is doing this?
tks
zion
<><
=-)