8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Shell : Bash shell (Fedora 26)
In the below text file (output.txt), I need to find all lines starting with the pattern pc. As you can see, only one line matches this condition (pc hello world).
But, my below 3 attempts return wrong output. How do I use the grep command correctly here ?
... (4 Replies)
Discussion started by: kraljic
4 Replies
2. Shell Programming and Scripting
Hello,
I have a csv list which contains a reference and tariff code for every customer we have (~7.2 million) looking something like this:
customernumber,tariff
012345678910,T0001
012345678911,T0002
012345678912,T0001-A0001
I have a 2nd list which contains every unique tariff and... (8 Replies)
Discussion started by: Cludgie
8 Replies
3. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
4. Shell Programming and Scripting
Hi, I'm new to shell scripting and i'm trying to write code which contains exactly three pipe commands (e.g. A | B | C) to return a list of the users currently logged into the system. I've been told three useful commands i could use are who, grep and cut. I know 'who' return a list of the users... (4 Replies)
Discussion started by: cylus99
4 Replies
5. Shell Programming and Scripting
I think I am doing this correctly, but it is responding very quickly with no results so I am not sure. I need to do a case insensitive grep of all files in my current directory
grep -i <keyword> /my/directory
is that correct? (1 Reply)
Discussion started by: guessingo
1 Replies
6. Shell Programming and Scripting
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Discussion started by: hariza
4 Replies
7. What is on Your Mind?
hi,
I am pretty new both to unix and this forum, can anyone help me to give shortcuts to my commands...
eg:-
instead of "cd /usr/bin"
i want to to give " bin " and get to that path.
I'm using HP-UX 11.0
abey (2 Replies)
Discussion started by: abey
2 Replies
8. UNIX for Dummies Questions & Answers
hi,
I am pretty new both to unix and this forum, can anyone help me to give shortcuts to my commands...
eg:-
instead of "cd /usr/bin"
i want to to give " bin " and get to that path.
I'm using HP-UX 11.0
abey (2 Replies)
Discussion started by: abey
2 Replies