10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
First, please excuse my apparent lack of attempt as this is NOT the case. I have attempted to research this for hours and realize I am way out of my league. I am not a programmer, especially in Unix.
I have an old Alpha Unix system with a program that prints to a network printer using the LPR... (4 Replies)
Discussion started by: Ken_Snauffer
4 Replies
2. Shell Programming and Scripting
Hi.
I need to filter lines based upon matches in multiple tab-separated columns. For all matching occurrences in column 1, check the corresponding column 4. IF all column 4 entries are identical, discard all lines. If even one entry in column 4 is different, then keep all lines.
How can I... (5 Replies)
Discussion started by: owwow14
5 Replies
3. UNIX for Dummies Questions & Answers
Thanks everyone. I got that problem solved.
I require one more help here. (Yes, UNIX definitely seems to be fun and useful, and I WILL eventually learn it for myself. But I am now on a different project and don't really have time to go through all the basics. So, I will really appreciate some... (6 Replies)
Discussion started by: latsyrc
6 Replies
4. Shell Programming and Scripting
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Discussion started by: SEinT
4 Replies
5. Shell Programming and Scripting
I am running a grep query for searching a pattern, and the output is quite huge. I want only the last 200 lines to be displayed, and I am not sure if tail will do the trick (can tail read from std in/out instead of files?).
Please help me out. (1 Reply)
Discussion started by: shell_newbie
1 Replies
6. Shell Programming and Scripting
Hi,
I have an unwanted string at random lines of my verilog (*.v) file.
(* abccddee *) input A;
(* xyz *) input B;
(* 1234 *) output C;
I want a clean file like this:
input A;
input B;
output C;
the unwanted string begins with "(*" and ends with "*)" at multiple lines.
Any help... (2 Replies)
Discussion started by: return_user
2 Replies
7. Shell Programming and Scripting
#!/bin/bash
usep=`df -hT | awk '{ print $5 }'`
for (1=1,1<8,i++)
output=`echo $usep | awk '{ print $i }'| cut -d'%' -f1`
echo $output
if
then
echo "critical value"
i need to echo critical value if disk usage pecentage xceeds 10
and i am face problem in position marked red here i... (9 Replies)
Discussion started by: josgeorge
9 Replies
8. UNIX for Advanced & Expert Users
Hi
I've got a file with a lot of blank lines in it or are they?...I tried to remove them by using
grep -v ^$ <filename>
This did not remove anything....I then tried the reverse to see if ^$ indeed matches anything...so I tried
$ grep ^$ grepres.txt
$ grep ^\s*$ grepres.txt
This... (5 Replies)
Discussion started by: venkatkk
5 Replies
9. Shell Programming and Scripting
Hi All,
I have the below input and i only want to filter out some un-wanted info from here. Expected output is below. Can somebody help ?
The catch is that i want to grep those lines with term "k=" and lines with term "**" as the 1st column and "07" as the last column. And the number of... (15 Replies)
Discussion started by: Raynon
15 Replies
10. Shell Programming and Scripting
Hi,
I have a file with the following:
access-list.txt
router1
access-list 1 permit any any
access-list 1 deny any any
router2
access-list 2 permit any any
access-list 2 deny any any
router3
access-list 3 permit any any
access-list 3 deny any any
I want to hava an output that... (10 Replies)
Discussion started by: I-1
10 Replies