|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Issues with awk and tcsh
Hello experts, I have two files which I'm uploading. One is an awk script and other file acts as an input to the script via positional parameter. awk -f intlmenu.awk jobsq.txt This run fine in C shell on SCO OpenServer Release 5.0.7. When I run it on Solaris 10 ( tcsh shell ) I get the following error Code:
awk -f intlmenu.awk jobsq.txt awk: string too long near line 103 awk: syntax error near line 103 awk: illegal statement near line 103 awk: newline in string near line 103 The 103 line in intlmenu script is as follows Code:
printf "echo \"Data File Start `head -1 %s.qca | awk -f /ychw/accts/firstlast.awk` Datafile End `tail -1 %s.qca | awk -f /ychw/accts/firstlast. awk` \" >>/tmp/$UETIME.txt \n",project[i],project[i] >> OutFile I suspect it is due to the c/tcsh shell's behavior since it complains about "Unmatched .".I have tried various combinations but have failed. Any help would be greatly appreciated. The desired output is as follows Code:
[INTERVIEW LENGTH]
SELECT ONE SURVEY
================
1) /cati/meat/live/meatlive 2) /cati/bexp/live/bexplive
3) /cati/fran/live/franlive 4) /cati/govt/live/govtlive
5) /cati/deak/live/deaklive 6) /cati/mwir/live/mwirlive
7) /cati/kely/live/kelylive 8) /cati/vcfn/live/vcfnlive
9) /cati/melt/live/meltlive 10) /cati/msmi/live/msmilive
11) /cati/star/12w3/star12w3 12) /cati/star/boo3/starboo3
13) /cati/oztam/r12w4/main/rztm12w4 14) /cati/oztam/r12w4/ref/rztmref
15) /cati/oztam/r12w4/6ccb/rztm6ccb 16) /cati/oztam/r12w4/nesl/rztmnesl
17) /cati/oztam/r12w4/6unres/rztm6unr 18) /cati/oztam/12w4/main/oztm12w4
NOW ENTER YOUR CHOICEThanks In advance Last edited by maverick_here; 12-04-2012 at 05:58 AM.. Reason: Including the desired output |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Hi.
The underlying shell has likely nothing to do with it. On Solaris I would use /usr/xpg4/bin/awk or nawk. Try that first, before changing what might not be broken. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks Scott
I have used nawk and it worked fine. It is a migration project from Sco to Sun. It never occurred be about using nawk or /usr/xpg4/bin/awk. Once again thanks a million.
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Awk OFS issues | 02JayJay02 | Shell Programming and Scripting | 9 | 10-23-2012 04:22 AM |
| tcsh issues | sardare | UNIX for Dummies Questions & Answers | 1 | 05-11-2010 11:07 AM |
| for / foreach syntax issues (in bash or tcsh) | thepolypore | Shell Programming and Scripting | 0 | 02-08-2010 01:28 AM |
| Issues with AWK | alanp | AIX | 12 | 05-07-2009 10:29 AM |
| Awk output issues. | amatuer_lee_3 | Shell Programming and Scripting | 4 | 05-16-2008 08:23 PM |
|
|