![]() |
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 |
| OOo Basic crash course: Creating a simple application launcher | iBot | UNIX and Linux RSS News | 0 | 05-28-2008 11:40 AM |
| OOo Basic crash course: Creating a simple game using strings in a database | iBot | UNIX and Linux RSS News | 0 | 04-02-2008 04:50 AM |
| Creating simple charts with Gambas 2.0 | iBot | UNIX and Linux RSS News | 0 | 12-12-2007 12:00 PM |
| creating an archiving script | jinxe | UNIX for Dummies Questions & Answers | 2 | 12-05-2007 09:16 AM |
| Creating a command history feature in a simple UNIX shell using C | -=Cn=- | Shell Programming and Scripting | 2 | 11-13-2007 01:04 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
creating a simple archiving script
Im trying to create a script to archive specified directories into a specified tarball backup file. This is what i want the input to look like
ex. save -i '/bin/b*' -i '/bin/ls' -o backup this is what i have #!/bin/bash #save - backup file script unset myInput unset myOutput while getopts "i: o:" myOpt do if [ $myOpt == "i" ] then myInput=$myInput" "$OPTARG elif [ $myOpt == "o" ] then myOutput=$OPTARG fi done echo "[Backing up $myInput to $myOutput]" if test -f $myOutput then echo "$myOutput already exists: must rename" fi echo "Input file list: " for file in $myInput do ls -laR "$file" done |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|