![]() |
|
|
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 date directory and moving files into that directory | ravi030 | Shell Programming and Scripting | 3 | 12-05-2008 04:18 AM |
| Moving all user files to another/new directory | gav_dhiman | UNIX for Dummies Questions & Answers | 11 | 08-27-2008 07:35 AM |
| Moving files not directory. | senthil_is | Shell Programming and Scripting | 1 | 05-09-2008 02:21 AM |
| How to Compress files before moving them in a directory | godalle | Shell Programming and Scripting | 3 | 11-10-2005 11:59 AM |
| moving files from a unix directory to a windows directory | gleads | UNIX for Dummies Questions & Answers | 2 | 08-29-2002 09:42 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Moving files to specified directory.
Hi I have made a shell script which moves files from a trash bin back to the original directory and also has the option to restoring the file to a directory that is specified by the user. The restoring it to the original directory is working fine, the restoring it to a specified directory is now. My code is below. Can someone help? Code:
if [ ! $1 ] ; then
echo "-n Restores to users specified path."
exit 1
elif [ $1 ] ; then
echo Restoring to original directory...
mv /home/trash/$1 .
elif [ -n $1 ]; then
echo Restoring to specified user directory
mv -i $1 .$2 ;
fi
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|