10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file example.txt as follows :SomeTextGoesHere
$$TODAY_DT=20140818I need to automatically update the date (20140818) in the above file, by getting the new date as argument, using a shell script.
(It would even be better if I could pass... (5 Replies)
Discussion started by: SriRamKrish
2. Shell Programming and Scripting
I need to find all rows in 1st col of one file in another file (first occurrence) and replace the 1st col of first file with the grep result (the entire line). For example search AA from file 1 in file 2 and replace in file 1 by entire line found.
AA BB CC DD
BB AA CC DDFile2
... (2 Replies)
Discussion started by: ritakadm
3. Shell Programming and Scripting
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
Discussion started by: thibodc
4. Shell Programming and Scripting
I have two variables x and y.
i need to find a particular string in a file, a workflow name and then insert the values of x and y into the next lines of the workflow name.
basically it is like as below
i need to grep the 'wf_xxxx' and then... (6 Replies)
Discussion started by: angel12345
5. Shell Programming and Scripting
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Discussion started by: rxc23816
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
7. UNIX and Linux Applications
A SystemOut.log file has recurring entries that follow this format:
Over the course of a day thousands of lines similar to this are produced, with each username represented hundreds of times.
I need to create a new file that shows... (4 Replies)
Discussion started by: 1075FJ40
8. Shell Programming and Scripting
i have a file that contents multiple instances of the same ERROR.Below the content of the file
Archiver6.log:2009-05-25 17:58:44,385 ERROR - CleanLPDataMessage: Missing Intervals: 2
Archiver6.log:2009-05-25 18:27:36,056 ERROR - CleanLPDataMessage: Missing Intervals: 5... (5 Replies)
Discussion started by: ali560045
9. Shell Programming and Scripting
I've seen several examples of grep showing the filename the string was found in, but what I really need is grep to show the file details in long format (like ls -l would).
grep mobile_number todays_files
This will show me the string I'm after & which files they turn up in, but... (2 Replies)
Discussion started by: woodstock
10. Shell Programming and Scripting
Hello all ( again )
I will like to search and replace string in text file
ok I can loop throw the files like :
foreach f ( ` find . -name "*."`)
.. but here I like to examine the file if in contain the desired string
and so do the sed -e 's/blah/foo/g' thingy on it or there is better way... (1 Reply)
Discussion started by: umen
ZGREP(1) General Commands Manual ZGREP(1)
zgrep - search possibly compressed files for a regular expression
zgrep [ grep_options ] [ -e ] pattern filename...
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
2 - An option that is not supported was specified.
Charles Levert (firstname.lastname@example.org)
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)