10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am new to scripting.
I have a requirement where I need to search for token present in array in a file. If the token is found I need to take the first column of that line from the file and append it to token and direct it to a new file.
e.g. token file
abc... (2 Replies)
Discussion started by: alok2082
2. Shell Programming and Scripting
Hi, i have a strange prob. log file contains ip, protocol, user name, agent . these can be in any order. If log contains the above order able to fetch all details but if details are in diff order not able to fetch all details.
using below command.
grep -A50 "Entry " "/logs/file.log" \
|grep... (6 Replies)
Discussion started by: Satyak
3. Shell Programming and Scripting
The token is any printable characters between 2 " .
The token is unknown, but we know that it is between 2 "
Tok 1 : "1234x567"
Tok 2 : "A3b6+None"
Tok 3 : "A3b6!1234=@"
The ligne is :
Line 1 :
"9876xABCDE"Do you have any code fragments or data samples in your post
Line 2 : ... (3 Replies)
Discussion started by: jcdole
4. UNIX for Dummies Questions & Answers
I have figured out how to be able to sort through lines in a file with multiple words in any order and display them using this command:
cat file | grep -i $OPTION1 | grep -i $OPTION2 | grep -i $OPTION3 OPTION1 is 2008, OPTION2 is Mar, OPTION 3 is Tue
Tue Mar 25... (4 Replies)
Discussion started by: semaj
5. Shell Programming and Scripting
Please take a look at the below eg. I would like to search for abc() pattern first and then search for (xyz) in the next line. If I can find the pattern, then I should delete the 3 lines.
I can only find the pattern and delete but I am unable to find two patterns and delete. Any... (8 Replies)
Discussion started by: sreedevi
6. Shell Programming and Scripting
I have a file with lots of lines in that I need to order based on the number of commas!
e.g the file looks something like :-
cn=john,cn=admins,cn=users,cn=uk,dc=dot,dc=com... (4 Replies)
Discussion started by: sniper57
7. Shell Programming and Scripting
Im trying to develop a shell script that will change the content order of the file.
For example I have a file that says
I want to change this to be
Im trying to use sed to this by reading the file and then inserting each line at the top
... (3 Replies)
Discussion started by: MBGPS
8. Shell Programming and Scripting
i'm making now a bash script, that runs some compiler... i want to take only errors form its output eg:
bla bla bla
erros is 1324546
the bla bla bla
bla bla bla...
and i want to get only
erros is 1324546
the bla bla bla (11 Replies)
Discussion started by: miechu
9. UNIX for Dummies Questions & Answers
I have a text
"abc def ghi"
and I want to get it as
"def abc ghi"
I am using this
echo "abc def ghi" | sed 's/\(*\)\(*\)/\2\1/'
But I am not able to get the output, could anyone help me.
Thanks (9 Replies)
Discussion started by: venu_nbk
10. UNIX for Dummies Questions & Answers
so i have been trying to learn how to manipulate text on my own and have gotten stumped...
let's say i have a text file that says (highly simplified):
How would swap the order of the words..
I know i need to use sed and some kind of back reference but cannot make it... (2 Replies)
Discussion started by: urtherhoda