Hi All
I am not able to delete few line from long file.
I have a big file which is of 53998 B in size i want to delete lines starting from 32768 to 53998 and collect remaining file in new file.
It is giving exception
sed: command garbled: 32768,$countd
Please find the sample script below
#!/bin/ksh
cd /usr/home/dfusr/backup
typeset myLogFile=pe_proxy_master_2160.Wed.log
typeset myFile=aaa.log
typeset -i count=0
count=$(cat pe_proxy_master_2160.Wed.log | wc -c)
echo "COUNT:: $count"
if [ count -gt 32767 ]
then
sed '32768,"$count"d' "$myLogFile" > "$myFile"
fi
COUNT:: 53998
Please advice where i am doing wrong