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 06-02-2007
convenientstore convenientstore is offline
Registered User
 

Join Date: Apr 2007
Posts: 42
I got it..

can someone place explain why in sed, using single quote ' ' makes this work versus double quote " " ??

[root@rleeserver tmp]# cat yaho11
#! /bin/sh

dir1=$1
dir2=$2
echo $dir1
echo $dir2

find /home/"$dir1" -type d -print |
sed -e 's;/home/'$dir1'/;/home/'$dir2'/;' |
while read newdir
do
mkdir $newdir
done
Reply With Quote