10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Given a csv file with 40 columns with name, address, hometown etc.
I use a bash command in 1 line which:
1. gets the address column and pipes that to
2. grep the first digit and everything that follows
Command:
awk -F ";" '{print $19}' /Users/jb/Desktop/ReorderTempTotal.csv | grep -o "\d.*"... (7 Replies)
Discussion started by: JBVeenstra
7 Replies
2. UNIX for Dummies Questions & Answers
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
Discussion started by: jcdole
1 Replies
3. Shell Programming and Scripting
Trying to create a command line script to look for all files matching a pattern, grep for a specific value in each file, and write out the filename long list. It's possible the filename won't containe the value.
{
echo “Running....”
for fname in 811_Intermediate_File_*
do
grep -l... (3 Replies)
Discussion started by: gavineq
3 Replies
4. UNIX for Dummies Questions & Answers
I'm hoping that there is a way to do this. I'm sure I won't be able to get the answer I need on the deadline I need it...but at least I'll learn how to solve this problem.
I have a file that looks like this:
(00:14:25\$ head -27 QNHDSPACEDVR
Name: PollDhctAVFSInfo 00:0F:21:4B:00:6A
Name:... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
5. Shell Programming and Scripting
Here is my script so far:
set dirs = ` find . -name "message.jar" 2> /dev/null | cut -d "/" -f 2 ` | uniq
foreach dir ( $dirs )
if (grep $dir/* someText==null) --> how do I write this in script?
print $dir
end
end (4 Replies)
Discussion started by: mmdawg
4 Replies
6. Shell Programming and Scripting
Hi,
My code is like this
if swlist -a revision 2>/dev/null | grep ABC 2>/dev/null
then
echo "Found Above mentioned ABC Version, please remove it first..."
fi
This is displaying the result to the screen.
i want to first suppress that and for that i wrote the below... (1 Reply)
Discussion started by: rag84dec
1 Replies
7. Shell Programming and Scripting
I found that when I used a variable to receive the result from a command execution, the newline characters were removed from the variable.
For example, I ran
$ ret=`ls -l`
$ echo $ret
Then, I saw:
total 40 -rw-r--r-- 1 testtrunk testtrunk 0 Dec 13 11:13 pk -rw-rw-r-- 1 testtrunk... (2 Replies)
Discussion started by: pankai
2 Replies
8. Shell Programming and Scripting
Hi
I have a problem using grep to find a pattern followed by newline.
Here is my file
xxxxxxxxxxxpattern
patternxxxxxx
pattern
xxxpattern
xxpatternx
xxxxxxyyyyxxxx
I want the result to be like this
xxxxxxxxxxxpattern
pattern
xxxpattern
Please help (2 Replies)
Discussion started by: lalelle
2 Replies
9. UNIX for Dummies Questions & Answers
I am new to unix. i need to know how to use grep to grep and expression from a file. and pass the result as a 0 for found and 1 for not found. I can only go up to grep 'Checking Subscription Status' ranos.log. Please help. Thank you. (2 Replies)
Discussion started by: Hak Dee
2 Replies
10. Shell Programming and Scripting
Hello All,
I have log file the result from a multithreaded process. So when a process finishes it will write to this log file as 123 rows merged.
The issue is sometimes the processess finish at the same time or write to the file at the same time as
123 rows merged.145 rows merged.
At... (5 Replies)
Discussion started by: ssikhar
5 Replies