![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating menus in script file | sinjin | UNIX for Dummies Questions & Answers | 6 | 12-10-2007 09:00 PM |
| Creating a menu within a script file | sinjin | Shell Programming and Scripting | 8 | 12-09-2007 10:18 PM |
| Help with a shell script for creating a log file | heprox | Shell Programming and Scripting | 2 | 11-13-2006 11:00 PM |
| Help ! Script creating unwanted file | boppr6470 | Shell Programming and Scripting | 2 | 10-05-2006 03:27 PM |
| Creating a file inside a script | sendhilmani | Shell Programming and Scripting | 11 | 03-21-2006 05:24 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error while creating .tar file using script
Hi,
I am getting following error while running script: tar: can't change directories to /home/xyz/script: No such file or directory tar: compress: No such file or directory tar: getts.tar same as archive file Following is my script: #!/bin/bash echo "You want:" echo "1. zip files." echo "2. remove files." echo -n "Enter your option:" read opt echo -n "Enter full File path:" read PATH echo -n "Enter File name:" read FILE if [ $opt -eq 1 ] then #zip files /usr/bin/tar -cvf $FILE.tar $PATH compress $FILE.tar fi Can some one give some solution. thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
read PATH
Gack!! Don't do that! PATH is a special variable that tells the shell where to find commands. Use some other name. |
||||
| Google The UNIX and Linux Forums |