![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| creating a file using Perl | chriss_58 | Shell Programming and Scripting | 1 | 06-03-2008 07:41 AM |
| Creating a file | ravisg | Shell Programming and Scripting | 2 | 05-10-2008 06:15 AM |
| help with creating new log file | john89011 | Shell Programming and Scripting | 0 | 02-29-2008 12:45 PM |
| Creating a txt file | outthere_3 | UNIX for Dummies Questions & Answers | 1 | 01-31-2008 11:09 PM |
| Creating a csv file based on Existing file | skywayterrace | Shell Programming and Scripting | 3 | 12-02-2007 09:19 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
|
||||
|
shoud I try to replace the $1 $2 and $3 with the drive percent and space variables?
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|