10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
2. Shell Programming and Scripting
Trying to get the unique count of the below input, but if the text in beginning of $5 is a partial match to another line in the file then it is not unique.
awk
awk '!seen++ {n++} END {print n}' input
7 input
chr1 159174749 159174770 chr1:159174749-159174770 ACKR1
chr1 ... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
I am using awk to search $5 of the "input" file using the "list" file as the search criteria. So if the id in line 1 of "list" is found in "search" then it is counted in the ids found. However, if the line in "list" is not found in "search", then it is outputted as is missing. The awk below runs... (3 Replies)
Discussion started by: cmccabe
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need to filter my data based on items in column 23. Column 1 until column 23 are tab separated. This is how column 23 looks like:
PRIMARY=<0/1:504:499,5:.:.:.:0.01:1:15:.>
I want to extract lines if items 7 (separated by : ) in column 23 are more than 0.25 . In example above , item... (2 Replies)
Discussion started by: janshamsani
2 Replies
5. Shell Programming and Scripting
Hi experts ,
I am trying to get the below output:
file :
0/6/4/1 0x0019503C2E26 5 UP lan5 snap5 1 ETHER Yes 224
0/6/4/0 0x0019503C2E25 6 UP lan6 snap6 2 ETHER Yes 224
0/2/1/0 0x0019503E6900 0 UP lan0 snap0 3 ETHER Yes 224... (8 Replies)
Discussion started by: rveri
8 Replies
6. Shell Programming and Scripting
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies
7. AIX
Hi,
I am executing below commands on HMC. I see that there is only colon ":" in output.
Can someone please help why I am getting ":" in output? Why I am not getting proper output?
xxxxx@yyyyhmc1:~> viosvrcmd -m PCC-p590#2-SN024D8F0 -p ppvio1 -c "lsmap -all"
:xxxxx@yyyyhmc1:~> viosvrcmd... (0 Replies)
Discussion started by: marya
0 Replies
8. Shell Programming and Scripting
Hi Expert,
I need help on script to put colon between two characters.
From this line 60060160B18414009C557D9DE02CDF11
to this 60:06:01:60:B1:84:14:00:9C:55:7D:9D:E0:2C:DF:11
Any way to make it on script. (2 Replies)
Discussion started by: ranjancom2000
2 Replies
9. UNIX for Dummies Questions & Answers
How do I deal with extracting a portion of a record when multiple field separators are involved.
Let's say I have:
Mike Harrington;(555) 555-5555:250:100:175
Christian Dobbins;(555) 555-2358:155:90:201
Susan Dalsass;(555) 555-6279:250:60:50
Archie McNichol;(555) 555-1348:250:100:175
Jody... (3 Replies)
Discussion started by: doubleminus
3 Replies
10. Shell Programming and Scripting
Please i need your help.
i made this script with awk, this scripts count and list a pattern for each directory in the output as shown. but not as desired. i want the output will be listed in a tabular way, using awk:
cuenta_cdrs()
{
for dir in *
do
cd $dir
for file in *
do
... (4 Replies)
Discussion started by: alexcol
4 Replies