Re: Help: How to add a character in the line
- From: Kenan Kalajdzic <kenan@xxxxxxx>
- Date: Sun, 12 Aug 2007 13:59:43 +0200 (CEST)
Amy Lee <openlinuxsource@xxxxxxxxx> wrote:
Hi,
I'm a Linux user, I'd like to know how to use sed or other command to add
a character in the line. Like this:
Original line:
16jh_1010
Hope it to be:
16>jh_1010
Here is a simple example of how to solve your problem:
$ echo '16jh_1010' >file
$ cat file
16jh_1010
$ sed 's/^16/&>/' file
16>jh_1010
If you are serious about using 'sed', you should learn as much as
possible about regular expressions and the syntax of 'sed'. There
are several good tutorials on the web and also a book published by
O'Reilly named "sed & awk".
Here is a good place to start:
http://www.grymoire.com/Unix/index.html
--
Kenan Kalajdzic
.
- Follow-Ups:
- Re: Help: How to add a character in the line
- From: Amy Lee
- Re: Help: How to add a character in the line
- References:
- Help: How to add a character in the line
- From: Amy Lee
- Help: How to add a character in the line
- Prev by Date: Help: How to add a character in the line
- Next by Date: Re: Help: How to add a character in the line
- Previous by thread: Help: How to add a character in the line
- Next by thread: Re: Help: How to add a character in the line
- Index(es):
Relevant Pages
|
|