NoSpaze wrote: > Am Mittwoch, den 10.06.2009, 16:35 +0200 schrieb Adel ESSAFI: >> Hi list >> Is there a method to delete a line from a file withoout editing it! >> I have found how to do this with awk, but it is heavy!! > > sed -i '/regex/d' file Or by number: sed -i '2d' file In the above example, 2 is the line number to remove. > regex is a regular expression. For example, deleting the lines that end > with "goodbye...": > > sed -i '/goodbye\.\.\.$/d' file > > :) > ---------------------------------------------- > Rodolfo Alcazar - rodolfo.alcazar@xxxxxxxxxxxx > otbits.blogspot.com / counter.li.org: #367962 > ---------------------------------------------- > "Träume nicht dein Leben, lebe deinen Traum." > - Unbekannter Autor > -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines