![]() |
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 |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 12:25 PM |
| Assigning output of command to a variable in shell | sankar reddy | Shell Programming and Scripting | 6 | 02-28-2008 03:01 AM |
| assigning command output to a shell variable | kprattip | Shell Programming and Scripting | 2 | 07-09-2007 04:01 AM |
| substring command works but only in BASH shell | edwardtk11 | Shell Programming and Scripting | 2 | 06-27-2007 05:25 PM |
| command for CPU online/offline status in bash shell | sars | UNIX for Advanced & Expert Users | 5 | 11-30-2006 06:10 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Using variable with cp command in bash shell
Hi,
I am trying to write script to copy some files(/ppscdr/cdrp2p/temp/) from one directory to another directory using shell script. see the script below, Code:
#!/bin/sh -f
dir_name=20061105
mkdir ${dir_name}
cd /ppscdr/cdrp2p/temp
pwd
cp p2p${dir_name}*.* /ppscdr/cdrp2p/${dir_name}
pwd
But id dosen't work properly (didn't copy the files). See the error as below, Code:
[root@cdrwebserver cdrp2p]# ./cp.sh /ppscdr/cdrp2p/temp cp: cannot stat `p2p20061105*.*': No such file or directory /ppscdr/cdrp2p/temp Can some one help me to find the resolve the error. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|