![]() |
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 |
| Simple Script | mojoman | Shell Programming and Scripting | 6 | 05-12-2008 03:55 AM |
| simple script | ali560045 | Shell Programming and Scripting | 1 | 01-22-2008 04:41 AM |
| Simple Script Help | Skunkie | UNIX for Dummies Questions & Answers | 4 | 10-02-2006 11:18 AM |
| simple awk script... | moxxx68 | Shell Programming and Scripting | 3 | 01-24-2005 04:17 AM |
| simple script | hedrict | UNIX for Dummies Questions & Answers | 4 | 02-23-2004 04:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
need help with simple awk/ksh script
I need help finding out why this script wont run. The chmod is okay, but i get an error saying that I need '&&' on line 5.
Quote:
|
|
||||
|
here is how it looks now
Quote:
|
|
||||
|
try this
Code:
#! /bin/ksh read x for file in `ls -al | awk $6 == "Sep" && $7 < 18''` do mv $file ~/compressed.tar/$file read x done for file in 'ls al | awk '$6 != "Sep"'' do mv $file ~/compressed.tar/$file read x done tar -cvf compressed.tar |
|
||||
|
Oops try this
Code:
read x
for file in `ls -al | awk '{$6 == "Sep" && $7 < "18"}'`
do
mv $file ~/compressed.tar/$file
read x
done
for file in 'ls al | awk '{$6 != "Sep"}'
do
mv $file ~/compressed.tar/$file
read x
done
tar -cvf compressed.tar sourcefilename
|
| Sponsored Links | ||
|
|