![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 |
| creating a file using Perl | chriss_58 | Shell Programming and Scripting | 1 | 06-03-2008 04:41 AM |
| Creating a file | ravisg | Shell Programming and Scripting | 2 | 05-10-2008 03:15 AM |
| help with creating new log file | john89011 | Shell Programming and Scripting | 0 | 02-29-2008 08:45 AM |
| Creating a txt file | outthere_3 | UNIX for Dummies Questions & Answers | 1 | 01-31-2008 07:09 PM |
| Creating a csv file based on Existing file | skywayterrace | Shell Programming and Scripting | 3 | 12-02-2007 05:19 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
creating a csv file in awk
Hi All
I am trying to create a csv file in the korn shell and the script segment is as follows: Code:
if [ percent -gt 80 ]
then
# NEED TO ADD INFO TO THE EMAIL FILE ABOUT THE DRIVE THAT'S FILLING UP
echo "$drive $percent% $space "|\
awk '{printf("%d/t"|"%d/t"|"%d/t\n", $drive,$percent%,$space)}' >> tempfile.txt
Code:
awk: syntax error near line 1 awk: illegal statement near line 1 the $drive $percent and $space are integers and are being pulled from a df -k command Please Assist |
| Forum Sponsor | ||
|
|
|
|||
|
shoud I try to replace the $1 $2 and $3 with the drive percent and space variables?
|