hai dani,
i have a problem with listing the contents of file in another directory.
my default path is in /home/pallu
where my file called DirProg script exists , now i want to find any file which starts with a or A in a dir and store the content in another file called output.dat.
im not able to dispaly file in the directory threw script.
my code is below:----
echo "Enter a directory name"
read dname
if test -d $dname
then
if grep -c ^A dirlist1
then
fname=`grep ^A dirlist1`
cat $fname|cat > output.dat
echo "Content of file is written in a file called output.dat"
fi
else
echo "The entered name is not a directory"
fi
thanks in advance.