10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
2. Shell Programming and Scripting
hi
I have a large xml file from which i have taken few lines . In this file I have to find for the string </invoices> and check if the 3 rd line after this string does not begin with <portCode> ,then i have to delete the string </invoices> and the next line having the string </shippingBill>... (13 Replies)
Discussion started by: sunnyboy
13 Replies
3. Shell Programming and Scripting
Hi,
I have input file whose first column needs(match.txt) to be matched with the first column of the input file with min & max length as defined in match.txt. But conditions are not matching. Please help on the changes in the code below as for multiple enteries in match.txt complete match.txt will... (3 Replies)
Discussion started by: siramitsharma
3 Replies
4. UNIX for Dummies Questions & Answers
Hi ladies and gentleman.. I have two text file with me. I need to replace one of the file content to another file if one both files have a matching pattern.
Example:
text1.txt:
ABCD 1234567,HELLO_WORLDA,HELLO_WORLDB
DCBA 3456789,HELLO_WORLDE,HELLO_WORLDF
text2.txt:
XXXX,ABCD... (25 Replies)
Discussion started by: bananamen
25 Replies
5. Shell Programming and Scripting
Hi Friends,
I have a text file like this
cat main.txt
I like this website
cat website > new_website
grep website > hello_website
cat replace.txt
hello
unix
apple
Now, for each line read in 2.txt, I want the pattern "website" in 1.txt to be replaced with it. Basically, I... (9 Replies)
Discussion started by: jacobs.smith
9 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement to to an ldapsearch and remove the shadow attributes in the output file.
What I do is ldapsearch() | operation to remove shadow > FILE
The ldapsearch gives output like this(with same line formation):
objectClass: FSConfig
objectClass: extensibleObject
fsCAIP:... (10 Replies)
Discussion started by: lorzinian
10 Replies
7. Shell Programming and Scripting
I've got a longish log file with content such as
Uplink traffic:
Downlink traffic:
I want to parse the log file and remove any line that contains the string "Uplink traffic:" at the beginning of the line, but only if the line following it beginnings with the string "Downlink traffic:" (in... (7 Replies)
Discussion started by: Yorkie99
7 Replies
8. Shell Programming and Scripting
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies
9. Shell Programming and Scripting
say i have a file with the following contents
0x20
0x20
0xc23886
> 0xc12354
> 0xc567555555
i want to delete "> " pattern and keep the rest of the file (6 Replies)
Discussion started by: lassimanji
6 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I need a script where I have delete all the files of type abc*.* from the directory /lmn/opq (passed as parameter to script)
But I need to check if there is file of type abc*.* existing in the directory or not before I use the
rm abc*.*
command.
Thanks (1 Reply)
Discussion started by: dsrookie
1 Replies