C shell script and awk.
From: Hon Seng Phuah (hsphuah_at_usa.com)
Date: 05/24/04
- Previous message: William Park: "Re: rename files problem"
- Next in thread: rakesh sharma: "Re: C shell script and awk."
- Reply: rakesh sharma: "Re: C shell script and awk."
- Reply: Ed Morton: "Re: C shell script and awk."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 May 2004 20:24:39 -0700
I have wrote these statements and named as loginfo.csh:
#! /bin/csh
set filePath = $argv[1]
set filePath = `echo $filePath | awk '{ split($filePath, subdir, "/");
for (path
in subdir) print path}'`
echo $filePath
When I ran above code using this command, "loginfo.csh
/test/good/life", I got these errors:
awk: Field $() is not correct.
The input line number is 1.
The source line number is 1.
Anyone knows where my problem is?
Thanks.
-HS Phuah
- Previous message: William Park: "Re: rename files problem"
- Next in thread: rakesh sharma: "Re: C shell script and awk."
- Reply: rakesh sharma: "Re: C shell script and awk."
- Reply: Ed Morton: "Re: C shell script and awk."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|