The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-21-2007
Anubhav Anubhav is offline
Registered User
 

Join Date: Feb 2006
Location: Mumbai, India
Posts: 24
Code looks ok..however one minor mistake I noticed maybe that helps

See below see if it works:

#!/bin/sh
src_path=/home/owngdw/abc
tgt_path=/home/owngdw/abc/xyz
if [ ! -d ${tgt_path} ];
then
mkdir -p ${tgt_path}
#mkdir -p abc/xyz
fi
cp ${src_path}/aaa* ${tgt_path}/

If not then let me know the error while executing it.
Reply With Quote