[CentOS] sed a particular line in file
Tom Brown
tom at ng23.netSat Apr 10 08:16:29 UTC 2010
- Previous message: [CentOS] sed a particular line in file
- Next message: [CentOS] about the bug of BCM57780
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> % cat foo > Hello line 1 > Hello line 2 > Hello line 3 > > # To change just line 2 > % sed '2s/Hello/There/' > Hello line 1 > There line 2 > Hello line 3 > > # To change line 2 and onwards > % sed '2,$s/Hello/There/' > Hello line 1 > There line 2 > There line 3 > > It's that simple :-) > > yes indeed - simples
- Previous message: [CentOS] sed a particular line in file
- Next message: [CentOS] about the bug of BCM57780
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list