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. Shell Programming and Scripting
Hi,
I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat.
My OS is:
SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies
3. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
4. Shell Programming and Scripting
Hi All,
I am new to shell srcipting.
Problem :
I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
Discussion started by: mail.chiranjit
2 Replies
5. Shell Programming and Scripting
I am new, really new to bash scripts.
I want to search an XML file for a certain string, say "1234567890"
Once found, I want to copy the entire contents from the previous instance of the string "Entity" to the next instance of "/Entity" to a txt file.
And then continue searching for the... (4 Replies)
Discussion started by: jrfiol
4 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
I tried awk for this, but failed <or my code is not correct? I dont know>. Can anyone help me on this?
---------- Post updated at 08:34 PM ---------- Previous update was at 08:29 PM ----------
my working file looks like this:
<empty>
<empty>
<empty>
NAME :ABC AGE :15
GENDER... (6 Replies)
Discussion started by: kingpeejay
6 Replies
8. UNIX for Advanced & Expert Users
I am using the following command to email a tex file as an attachment-
cat mailtext.txt | elm -s "Subject" emailAddr
where content of mailtext.txt is -
"Body of email"
This will attach foo.txt with the email.
My problem is that the file foo.txt is ceated dynamically everytime with a... (5 Replies)
Discussion started by: hpuxlxboy
5 Replies
9. UNIX for Dummies Questions & Answers
:confused:
I have more than 8000 files in a dir, I need to copy to other dir which containing the "sample"
I tried
grep -il "1189609240791-1268115603299237276@216.109.111.119 ' | cp /tmp/inv
Nothing is happening for long time for 100 file dir too,
Any one can help me? (11 Replies)
Discussion started by: redlotus72
11 Replies
10. UNIX for Advanced & Expert Users
Hello there
I need to find a string in an file, and then copy to a new file from the previous 6 lines to 41 lines after the string.
So, what i need to do , and just don't know how, is to find the string and copy 48 lines where the string would be in the 7th line.
I don't know if i can do it with... (10 Replies)
Discussion started by: vascobrito
10 Replies