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"
if test -d $dname
if grep -c ^A dirlist1
fname=`grep ^A dirlist1`
cat $fname|cat > output.dat
echo "Content of file is written in a file called output.dat"
echo "The entered name is not a directory"
thanks in advance.