![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error in if statement | capri_drm | Linux | 16 | 05-14-2008 03:00 PM |
| Snytax error on If Statement--help | dannyd_y | Shell Programming and Scripting | 2 | 05-08-2008 12:25 AM |
| parsing error in if statement | rakeshou | Shell Programming and Scripting | 2 | 09-25-2007 11:46 AM |
| For loop statement - catch error | lumdev | Shell Programming and Scripting | 4 | 09-20-2007 08:50 AM |
| tar error statement | legato | UNIX for Dummies Questions & Answers | 3 | 03-29-2005 10:58 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I have a script as given below: pr_det="1" if[$pr_det == 1] then awk ' BEGIN {printf("%23s","session")}' >> report.txt awk ' BEGIN {printf "\n"} ' >> report.txt else awk ' BEGIN {printf("%55s","file_dsc")} ' >> report.txt awk ' BEGIN {printf("%101s","no_recs")} ' >> report.txt fi But there is some error in the script witht the if statement. Can Someone correct it for me? I have tried if[${pr_det} = "1"] but i got errors like this: if[1 == 1]: command not found syntax error near unexpected token `then' `then' Thanks in advance JS |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|