10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am new to grep and Linux and am looking to see if grep can parse out a list of lines that have a difference of more than 10 seconds between the times on each line.
Example
2016-09-17 19:30:57 INFO: id: 4562079216, time: 2016-09-17 19:30:41,
2016-09-17 12:02:26 INFO: id:... (26 Replies)
Discussion started by: Markham
26 Replies
2. Shell Programming and Scripting
So, I have the following code:
cat testfile.txt | awk -F, '{ print $1" "$2" "$3" "$4" "$5 }' | read DOC ORG NAME
echo "$DOC"
echo "$ORG"
echo "$NAME"
My testfile.txt looks something like the following:
Document Type,Project Number,Org ID,Invoice Number
It will eventually be more... (14 Replies)
Discussion started by: Parrakarry
14 Replies
3. UNIX for Dummies Questions & Answers
Two things.
1. I need to list all the jpg that start with a specific pattern and I tried using wildcards and can't get it to work. Basically:
grep "cpd*.jpg" myfile.sgm return all entries that start with cpd (wildcard) and jpg
but this does not work and I can't find another option--I'm... (4 Replies)
Discussion started by: jcor826
4 Replies
4. UNIX for Dummies Questions & Answers
This seems like an easy question, but I can't find an answer already posted.
I want a command to return all of the lines in a file containing exactly a string
I tried
grep -x "372701" x.txt
but this did not return anything
I am just trying to search a file for lines which contain... (4 Replies)
Discussion started by: jgrosecl
4 Replies
5. Shell Programming and Scripting
pattern matching porblem.
I have a file with lines like this:
hdisk2 blah 03
hdisk3 blah 03
hdisk21 blat 06
hdisk23 blah 06
hdisk210 blat 06
So I want to grep for just hdisk2, but I get back as you would expect
hdisk2
dhsik21
hdisk23
hdisk210
I tried several... (1 Reply)
Discussion started by: adder2
1 Replies
6. Shell Programming and Scripting
Friends;
I have little experience with shell and I am not able to resolve this
problem:
file1:
CRA-JJ-W980-01; 2009-11-24; GigabitEthernet; 0/0
CRA-JJ-W980-01; 2009-11-24; GigabitEthernet;1/0
CRA-JJ-W980-01;2009-11-24;GigabitEthernet;3/0... (5 Replies)
Discussion started by: He2
5 Replies
7. UNIX for Dummies Questions & Answers
How come grep testfile1 won't find anything in testfile1 (even though the characters sd are there in great quantity), but grep '' testfile1 will find plenty?
Do the single quotes prevent the shell from interpreting the testfile1 is interpreted as: grep *test whether or not characters sd exist*... (5 Replies)
Discussion started by: doubleminus
5 Replies
8. Shell Programming and Scripting
I'm looking to write a script that takes a certain directory and gzips all its files that are older than 2 days. I've done some research but for the life of me, I can't even get any files gzipped. Any help would be greatly appreciated! (3 Replies)
Discussion started by: adrockrocks
3 Replies
9. Shell Programming and Scripting
Hi,
I really need some help with GREP searching...
I need to find all occurances of a file reference and remove two characters from the end of the reference. For example, here are a few lines showing the text:
<image file="STRAIGHT_004CR.jpg" ALT="STRAIGHT_004CR.jpg" />
<image... (8 Replies)
Discussion started by: steveglevin
8 Replies
10. UNIX for Dummies Questions & Answers
Hi again. Sorry if it seems like I'm spamming the boards a bit, but I figured I might as well ask all the questions I need answers to at once, and hopefully at least get some.
I have installed Solaris 10 on a server. The default text editors are there (vi, ex, ed, maybe others, I know emacs is... (4 Replies)
Discussion started by: EugeneG
4 Replies