The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #7 (permalink)  
Old 09-27-2006
hitmansilentass hitmansilentass is offline
Registered User
  
 

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