9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to search for a string in a file and print all the matched lines as pipe delimited format.
My command is
cat m_gid_trans.XML|grep -i '<TABLEATTRIBUTE NAME ="Lookup cache directory name"'
The output I am getting is
<TABLEATTRIBUTE NAME ="Lookup cache directory name"... (4 Replies)
Discussion started by: sampoorna
4 Replies
2. Shell Programming and Scripting
comm -13 tmpfile tmpfile2 | grep -v <filename> >newfile
so i want to
1. find records in 1 file bot not in another
2. The output of the first part is 1 field in a file with many fields.
3. find all the records that do not have the value piped from step #1
4. redirect to a new file
... (4 Replies)
Discussion started by: guessingo
4 Replies
3. UNIX for Dummies Questions & Answers
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
Discussion started by: jcdole
1 Replies
4. UNIX for Dummies Questions & Answers
We have a number of OS X 10.6 machines who have home folders with incorrect permissions, which are causing managed prefs not to be applied correctly and not allowing saving. I need to delete all home folders whose name is numerical and modified before a certain date. I'm not sure of the date part... (2 Replies)
Discussion started by: airlocksniffer
2 Replies
5. Shell Programming and Scripting
Trying to create a command line script to look for all files matching a pattern, grep for a specific value in each file, and write out the filename long list. It's possible the filename won't containe the value.
{
echo “Running....”
for fname in 811_Intermediate_File_*
do
grep -l... (3 Replies)
Discussion started by: gavineq
3 Replies
6. UNIX Desktop Questions & Answers
I am ptting the following into an FTOP script.
date=`TZ="aaa24" date +'%Y%m%d'` # this gets Yesterday date
.
.
.
.
mput < 'l | grep $Vdate'
# the idea to grep a listing from a directory that has yesterday date in its file name then put it in the remote FTP server. How can I get it... (4 Replies)
Discussion started by: raouf@comcast.n
4 Replies
7. Shell Programming and Scripting
Is there a way I can do this:
search for text and replace line containing matched text with a different line?
For example:
"I want to replace text"
I want to search for replace and then change the line to
I am perplexed.
Hope that makes sense.
Thanks in advance. (4 Replies)
Discussion started by: arsh
4 Replies
8. Shell Programming and Scripting
Hello !
I want to process a text file in order to extract desired data using sed and grep... Now I am facing a problem piping to grep... nothing happens..
The text consists of blocks of 3 lines that may (or not) contain the Desired data.
the desired data is on each 2... (4 Replies)
Discussion started by: ShellBeginner
4 Replies
9. Shell Programming and Scripting
Hi all,
Can someone help me with the following problem.
I am executing the following command:
(search for occurences of 'error' in files that match cl-*.log expression)
> grep -cw -i --max-count=1 'error' cl-*.log
this command outputs:
cl-apache.log:1
cl-apache_error.log:1... (3 Replies)
Discussion started by: epro66
3 Replies