10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear team,
Need support to built awk script for below requirement
Input file
LOTC cluster state:
-------------------
Node safNode=SC_2_1 joined cluster |
Node safNode=SC_2_2 joined cluster |
Node safNode=PL_2_3 fail cluster |
AMF cluster state:
------------------... (16 Replies)
Discussion started by: shanul karim
16 Replies
2. Shell Programming and Scripting
Hi,
I have some data like below:
John 254
Chris 254
Matt 123
Abe 123
Raj 487
Moh 487
How can i print it using awk to have:
254 John,Chris
123 Matt,Abe
487 Raj,Moh
Thanks. (4 Replies)
Discussion started by: james2009
4 Replies
3. Shell Programming and Scripting
Hello,
one step in a shell script i am writing, involves Grep command to search a regular expression in a line an only print the string after the match
an example line is below
/logs/GRAS/LGT/applogs/lgt-2016-08-24/2016-08-24.8.log.zip:2016-08-24 19:12:48,602 ERROR... (9 Replies)
Discussion started by: Ramneekgupta91
9 Replies
4. Shell Programming and Scripting
I need to fetch particular string from log file based on grep condition match.
Actual requirement is need to print the next word from the same line based on grep string condtion match.
File :Java.lanag.xyz......File copied completed : abc.txt
Ouput :abc.txt
I have used below... (5 Replies)
Discussion started by: siva83
5 Replies
5. Shell Programming and Scripting
Hi,
I have the logs :
cat logsx.txt
744906,{"reportingGroups":,"version":"2.0"}
678874,{"reportingGroups":,"version":"2.0"}
193571,{"reportingGroups":,"version":"2.0"}
811537,{"reportingGroups":,"version":"2.0"}
772024,{"reportingGroups":,"version":"2.0"}... (5 Replies)
Discussion started by: justbow
5 Replies
6. Shell Programming and Scripting
Hello,
I need an awk command to print only the lines that match regex on xth field from file.
For example if I use this command
awk -F"|" ' $22 == "20130117090000.*" 'It wont work, I think, because single quotes wont allow the usage of the metacharacter star * . On the other hand I dont know... (2 Replies)
Discussion started by: black_fender
2 Replies
7. Shell Programming and Scripting
Hi all,
I'm trying to do some work on the authorized_keys file to do a check if there's any information after the hash key.. At the end of the hash key's in the file, there can be an = or ==
Is there a way to check if anything exists after these equals and if so print it out or else print... (2 Replies)
Discussion started by: Jazmania
2 Replies
8. Shell Programming and Scripting
Hi All,
Does anyone know how to print 1H1A....... in peal script
print line ^1H1A....... if next line equal 5R0RECEIPT....
Thank for help:D
Cat st.txt
1H1A-IN-11-5410-0009420|1010047766|dsds|1|N|IN|IN|000000|1||N|<<<line match
5R0RECEIPT|
5R0RECEIPT|... (2 Replies)
Discussion started by: kittiwas
2 Replies
9. Shell Programming and Scripting
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Discussion started by: rowie718
5 Replies
10. Shell Programming and Scripting
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
Discussion started by: bash_in_my_head
8 Replies