10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
OS version: RHEL 6.7
Shell : Bash
I have a file like below. It has 500K lines.
I want to extract TAG_IDs shown in single quote at the end to copied to another file. As if I had copied the TAG_IDs using block select (Column Select) in modern text editor
$ cat file.txt
UPDATE TAGREF SET... (9 Replies)
Discussion started by: John K
9 Replies
2. UNIX for Beginners Questions & Answers
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
3. Shell Programming and Scripting
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies
4. Shell Programming and Scripting
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies
5. Shell Programming and Scripting
I have file input like-
abc,"123",""123","123","123","123","123","123","123","123","123","123","123","123",
abc,"123","123","123","123","123","123","123","123","123""123",abc etc
Input file consists of 1000 records and i want to copy into final file except abc
abc is at fixed position... (6 Replies)
Discussion started by: AhmedLakadkutta
6 Replies
6. Shell Programming and Scripting
i have a file1 with many lines. i have a script that will let me input a string. for example, APPLE. what i need to do is to copy all lines from file1 where i can find APPLE or any string that i specify and paste in on file 2
thanks in advance! (4 Replies)
Discussion started by: engr.jay
4 Replies
7. Shell Programming and Scripting
Alright, so in ed i do a subsititution:
ed file << 'HERE'
s/.*h2.*>\(.*\)<.*/\1/p
HERE
This gives me my desired line:
Errors found while checking this document as XHTML 1.0 Transitional!
But how would i put this line in a temporary file ? (4 Replies)
Discussion started by: Bertieboy7
4 Replies
8. Shell Programming and Scripting
I'm trying to copy a string (myame@yahoo.com) from multiple files and save them to a new file.
This is what's I've gathered so far:
sed 's/string/g' file.txt > output.txt
Not sure how to run this on multiple files and extract just the email address found in each file.
Any help would be... (2 Replies)
Discussion started by: rdell
2 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I am trying to copy all the text from a file below a search string...
For example i want to grep all text below the word sure:
UNIX for Dummies Questions & Answers
If you're not sure where to post a UNIX or Linux question,
post it here.
All UNIX and Linux newbies welcome !!
... (2 Replies)
Discussion started by: aliaa2a
2 Replies
10. Shell Programming and Scripting
Hi,
I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that?
Please help.
Malay (1 Reply)
Discussion started by: malaymaru
1 Replies