SED to extract characters


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SED to extract characters
# 1  
Old 08-03-2007
SED to extract characters

Hi,

Please let me know how do we write a piece of code to extract characters from a line using SED.
# 2  
Old 08-03-2007
Dont post duplicate thread and please write in detail about your req.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Outputting characters after a given string and reporting the characters in the row below --sed

I have this fastq file: @M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86 GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA +test-1 GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies

2. Shell Programming and Scripting

sed replacing specific characters and control characters by escaping

sed -e "s// /g" old.txt > new.txt While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies

3. Shell Programming and Scripting

extract last 8 characters from a file name

Dear gurus I have several files with the following format filenameCCYYMMDD , that is the last 8 characters will be the date in CCYYMMDD format. eg FILENAME20110523 . Could anyone please put me through on how to extract only the last 8 characters from the files. I am thinking of using awk,sed... (2 Replies)
Discussion started by: erinlomo
2 Replies

4. Shell Programming and Scripting

Extract data between two characters

Hi, how can i extract a data between two characters input file is abc efg hig - 99.4% (16337276 kB) used efg klm - 47.1% (7734968 kB) used hij - 99.4% (16341464 kB) used klm -93.7% (15394516 kB) used output should be 99.4 (5 Replies)
Discussion started by: jobycxa
5 Replies

5. Shell Programming and Scripting

TO Extract Last 10 Characters from a line

Hi Guys!!!!!!!!!!! How do we extract last 13 characters from a line I/p: .R1/new/sv902a.01.per O/p: sv902a.01.per And the no of characters differs in each line.. Kindly help me out in this!!!!!!!!!!! Thanks in Advance (4 Replies)
Discussion started by: aajan
4 Replies

6. UNIX for Dummies Questions & Answers

extract characters from a variable

Hi All, I have scenario as below, I want to cut the characters and store it variable2.. and want to display the variable2.. as shown below... eg: the size may differs , i am show just an example..... numbers are not fixed in variable1..i want to extract characters and... (1 Reply)
Discussion started by: G.K.K
1 Replies

7. Shell Programming and Scripting

Extract some characters with SED or AWK

Hi, I have the following example string: today_is_a_good_day.txt The character "_" inside the string can sometimes be more or less. The solution for every string equal the count of "_" should be alway the rest after the last underline character. Result: day.txt I want to use awk... (5 Replies)
Discussion started by: climber
5 Replies

8. Shell Programming and Scripting

Extract string between two different characters

I want to extract a string from a line in a text file between two different characters: for example: :string" I want to extract string. It has to be done in a one-liner. (11 Replies)
Discussion started by: rein
11 Replies

9. Shell Programming and Scripting

SED to extract characters

Hi, Please let me know how do we write a piece of code to extract characters from a line using SED. (2 Replies)
Discussion started by: Shilpi
2 Replies

10. UNIX for Dummies Questions & Answers

Grep and extract the characters after

Hi All, I have lines like below in a file A /u/ab/test1.dat A/u/ab/test2.dat A /u/bb/test3.dat A/u/cc/test4.dat I will need /u/ab/test1.dat /u/ab/test2.dat /u/bb/test3.dat /u/cc/test4.dat Pls help Thanks (6 Replies)
Discussion started by: thumsup9
6 Replies
Login or Register to Ask a Question