X=$(cat yourfile.txt)
Y=${#X}
((Y-8))
sed -n "1,${Y}p" yourfile.txt > newfile.txtcheck this. On May 27, 8:32 am, Husam <[email protected]> wrote: > Hello Joluggers > I need help in the following case a text file that ends with (in hex) 0A00, > i want to remove it > what is the easiest way > > i am trying sed 's/\(.*\)[\r]/\1//' to detect the last match and replace it > with null, but got stuck in this ,,, Help > > Thanks > -- > Husam Habannakeh > +971 5055 164 89 Dubai > +962 777 656 086 Amman > +966 5611 54 798 Riyadh > Sent from Riyadh, Ar Riyad, Saudi Arabia --~--~---------~--~----~------------~-------~--~----~ ### Jordan Linux Users Group ### http://Jolug.org/ http://groups.google.com/group/Jolug ### Ubuntu Jordan LoCo Team ### https://wiki.ubuntu.com/JordanTeam http://lists.ubuntu.com/ubuntu-jo ### Ojuba Linux ### http://ojuba.org/ ### Jordan PHP ### http://groups.google.com/group/JoPHP -~----------~----~----~----~------~----~------~--~---

