10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm trying to learn about regular expressions. Let's say I want to list all the files in /usr/bin beginning with "p", ending with "x", and containing an "a".
I know this works:ls | grep ^p | grep x$ | grep abut I'm thinking there must be a way to do it without typing grep three times. Some of my... (9 Replies)
Discussion started by: Xubuntu56
9 Replies
2. Shell Programming and Scripting
Hi everyone,
I'm new to the forums, as you can probably tell... I'm also pretty new to scripting and writing any type of code.
I needed to know exactly how I can grep for multiple strings, in files located in one directory, but I need each string to output to a separate file.
So I'd... (19 Replies)
Discussion started by: LDHB2012
19 Replies
3. Shell Programming and Scripting
Since there are approximately 75K gsfiles and hundreds of stfiles per gsfile, this script can take hours. How can I rewrite this script, so that it's much faster? I'm not as familiar with perl but I'm open to all suggestions.
ls file.list>$split
for gsfile in `cat $split`;
do
csplit... (17 Replies)
Discussion started by: verge
17 Replies
4. UNIX for Dummies Questions & Answers
Greetings!
I have been tasked to create a report off files we receive from our hardware suppliers. I need to grep these files for two fields 'Test_Version' and 'Model-Manufacturer' ; for each field, I need to capture their corresponding values.
When running each statement separately, I get... (4 Replies)
Discussion started by: alan
4 Replies
5. Shell Programming and Scripting
Hello everyone.
I wrote the following script but the second part is not excecuting. It is not sending the notification by email if the error occurs.
the send mail is working so i think the errorr should be in the if statement
LOGDIR=/logs/out
LOG=`date "+%Y%m%d"`.LOG-FILE.out #the log file ... (11 Replies)
Discussion started by: adak2010
11 Replies
6. Shell Programming and Scripting
Dear all
i am having text file like
xxx|yyy|1|2|
zzz|rrr|3|4|
www|xxx|><
5|6|><
jjj|kkk|><
8|9><
i want to join two lines which are having ' >< ' by taking only two lines at a stretch ...using awk command
the result output should be
xxx|yyy|1|2|
zzz|rrr|3|4|
www|xxx|5|6|... (2 Replies)
Discussion started by: suryanarayana
2 Replies
7. Shell Programming and Scripting
Hi
I am having text file like this
001|ramu|hno221|><
sheshadripuram|delhi|560061><
002|krishna|hno225|><
newdelhimain|delhi|560061><
i want to combine every two lines as single...line...
i.e
001|ramu|hno221|sheshadripuram|delhi|560061
can u pls help me (3 Replies)
Discussion started by: suryanarayana
3 Replies
8. UNIX for Dummies Questions & Answers
I have a command that does something and then creates a log file (importlog.xml).
I then want to grep that newly created log (importlog.xml) file for a certain word (success).
I then want to write that grep result to a new file (success.log).
So far I can run the command which creates the... (2 Replies)
Discussion started by: Sepia
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
i tried to combine grep with find and it didnt work
grep 'find dirname filename"
i also would like that the file will be sorted in the way.
thanks a lot. (2 Replies)
Discussion started by: Spoiler
2 Replies
10. Shell Programming and Scripting
Hi All ,
Any one help me to combine two files in shell scripting .Below is my requrement
i have 2 files as follows
filea
newyork America
Texas America
london Engalad
Fileb
abc
def
xyz
i have to combine this file as follows
newyork America abc
Texas ... (1 Reply)
Discussion started by: ajmalc
1 Replies