I've been working on getting a script to take size, dir name and file name variables from an input file and creating the same dir structure along with the file of specific size.
An example of the input file:
size/dirname/filename
2100/JAN_06/12345ABC.TCC
2354/FEB_06/24564XYZ.NOS
11240/MAR_06/1212ABAB.NCC
I am able to get results with the following code:
Code:
#!/bin/sh
set filesize=$1
set dirname=$2
set filename=$3
awk -F/ '{print $1,$2,$3}' os_listing.out | \
while read filesize dirname filename
do
mkdir $dirname
cd $dirname
dd if=test/inputfile of=$filename bs=1 count=$filesize
cd ..
done