Re: script or line command to change a line

From: N. Leenders (nadine_at_UALBERTA.CA)
Date: 05/26/05

  • Next message: Tansley, David: "mksysb dvd"
    Date:         Thu, 26 May 2005 12:36:29 -0600
    To: aix-l@Princeton.EDU
    
    

    With vi, to get into the file:
    vi /etc/security/users

    To move to the correct line, use / to search, eg:
    /oracle
    /maxage

    Once on the correct line, press the "l" key repeatedly until the curser is
    over the 8. Press "r" for replace, then "0" to replace the 8 with 0.

    To write out the file, type ":wq".

    If you goof up and want to exit without writing the file, type ":q!"

    Maybe practice on a copy of the file.

    Nadine Leenders
    Research Support
    Computing and Network Services
    University of Alberta

    On Thu, 26 May 2005, Leyden, Joseph wrote:

    > I'm not familiar with vi, ex, awk .... but
    > basically I want a line change in a file.
    >
    > The old line is:
    >
    > maxage = 8
    >
    > to
    >
    > maxage = 0
    >
    > only from one user (say user oracle),
    > in the /etc/security/users
    >
    > Looks like I have to find 'oracle' first and change
    > the first occurence of 'maxage = 8'. (but I dont
    > know how to do it)
    >
    > Can someone show me how this is done for free?
    >
    > Thanks,
    > Joe
    >


  • Next message: Tansley, David: "mksysb dvd"