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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-17-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
List of files with complete path


Code:
list.txt
/dir/a
/dir/b
/dir/c


Code:
while read file
do
if [ ! -d "$file" ] ; then
mkdir -p "$file"
touch "/$file/newfile"
fi ;
done < list.txt

That should be a starting point.

Not tested.