Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Cd and mv in a tar ksh script not working

$
0
0
hi forums, can you help me on how to make cd and mv code work in this script?
Code:

#!/bin/ksh
#i got it from: http://www.unix.com/shell-programmin...-two-days.html
MAIN_DIR=/home/user/pumela
find ${MAIN_DIR} *.txt -mtime -3> FILE_LIST
tar -cvf archive1.tar -L FILE_LIST
for x in ${FILE_LIST}
rm  $x
rm FILE_LIST
done
cd /home/user/pumela #this code not working
mv *.tar ./archive #this code not working also


Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images