![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error in if statement | capri_drm | Linux | 16 | 05-14-2008 11:00 AM |
| Snytax error on If Statement--help | dannyd_y | Shell Programming and Scripting | 2 | 05-07-2008 08:25 PM |
| parsing error in if statement | rakeshou | Shell Programming and Scripting | 2 | 09-25-2007 07:46 AM |
| For loop statement - catch error | lumdev | Shell Programming and Scripting | 4 | 09-20-2007 04:50 AM |
| tar error statement | legato | UNIX for Dummies Questions & Answers | 3 | 03-29-2005 06:58 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Hi All
The error was witht tehe spacing; Thanks Thread closed |
|||
| Google The UNIX and Linux Forums |