View Single Post
  #4   (View Single Post)  
Old 7th April 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default

This is my script
Code:
#!/bin/ksh
#

#Reading file
read ANSWER?"Enter location file to read: "

#check source file
if [[ ! -f $ANSWER ]]
then
        print "$ANSWER: File not found or not accessible, make sure your enter t
he right path."
        exit 1
else
        #Name the output file
        read OUTPUT?"Give a name to the output file: "

        #write to file
        echo $(tcpdump -r $ANSWER -o -ttt -vv -e -n) > $OUTPUT
fi

~
when i open the output file, all the data are printed in 1 line...
Reply With Quote