Re: removing lines from a file

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 06/28/04


Date: Mon, 28 Jun 2004 18:11:26 GMT

On 28 Jun 2004 09:18:58 -0700, RMH <haithem.rahmani@st.com> wrote:
>
>
> Hi all,
>
> Does someone Know how can I remove the two last lines from a file and
> save the modification?
>
> shell script if possible
>
> else
>
> sed command
>
>

Do you mean the last two lines, or the last two lines that are not
empty?

>
>
>
> GNU:((GNU Not Unix)Not Unix) not UNIX

GNU is certainly Unix. Linux is a clone of Unix.

"A rose by any other name would smell as sweet."

AC



Relevant Pages

  • RE: Using Mutiple Sheets in excel in shell script
    ... write in C Language and hardewr in a shell script. ... The code below can be compiled on any basic compiler and run on unix if you ... OutputLine = OutputLine & CStr(Cells(RowCount, ColumnCount)) ...
    (microsoft.public.excel.programming)
  • Re: Mac OS X Security - Not Quite as Strong as you Thought
    ... What needs to be fixed is the installer itself, ... Eventually you could trace it back to one of the fundamental Unix libs. ... UNIX won't prevent an idiot from damaging his own system, but it sure won't run a shell script that was downloaded from another system. ... The userid won't match for one thing and another is that if it were emailed, the x bit is set off, which means the user would have to chmod +x file to get it to work. ...
    (comp.sys.mac.advocacy)
  • Re: Google Earth for Linux released
    ... Have fun! ... Well the piece of crap don't run on my machine. ... For this GE file it would say 'shell script', so you'd know to run it ... I have run every flavor of Unix, QNX, zenix, Irix, several Linux ...
    (alt.os.linux.suse)
  • Re: how to tell if a file is inary file or ascii file?
    ... >>Is there a way to find if a file is a binary executable file or an ASCII ... > may assume it's a Bourne shell script. ... a unix shell, but if the file is a shell script and not binary ...
    (comp.unix.programmer)
  • Re: "RESTful Web Services"
    ... so Unix should make that easy to automate. ... Lisp, lambda calculus, and AI so much as it is the notion of regular ... experience - the "compilation phase" comes when you save a shell ... save a Perl script which writes a shell script for you to ...
    (comp.lang.ruby)