The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-27-2006
hitmansilentass hitmansilentass is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 37
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

Anyways, what are you trying to achive here??