10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I'm grepping for the following right now:
ls -la /somedirectory/*.log* | awk '{print $9}'
The problem with this is that I get the following output:
/somedirectory/errors_1_foo.log
/somedirectory/errors_1_foo.log.1
/somedirectory/errors_1_foo.log.2... (4 Replies)
Discussion started by: LinuxRacr
4 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file
---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
Discussion started by: jimmyf
1 Replies
3. Shell Programming and Scripting
I'm currently working on a script that extracts files from a .zip, runs an sha1sum against them and then uses awk to pre-format them into zomething more readable thusly:
Z 69 89e013b0d8aa2f9a79fcec4f2d71c6a469222c07 File1
Z 69 6c3aea28ce22b495e68e022a1578204a9de908ed File2
Z 69... (5 Replies)
Discussion started by: Ethereal
5 Replies
4. Shell Programming and Scripting
Hello All,
Could you please help with this.
This is what I have:
506234.222 2
506234.222 2
506234.222 2
506234.222 2
508212.200 2
508212.200 2
333456.111 2
333456.111 2
333456.111 2
333456.111 2
But this is what I want:
506234.222 1
506234.222 2
506234.222 2
506234.222 3 (5 Replies)
Discussion started by: canimba
5 Replies
5. Shell Programming and Scripting
I've the output in the file like below. I want to capture the value in file before string(*) and the similar value in next line only.
cat test1.txt
0003 Not Visible (M) 0 00 03F
0005 Not Visible (M) 0 00 040
- AVAILABLE 0 00... (1 Reply)
Discussion started by: sai_1712
1 Replies
6. Shell Programming and Scripting
Hi All,
I have a file which has some Linux commands in every line like
more 456.dat
more 3232.dat
more 433.dat
I want to add texts like this at the end of every line:
more 456.dat > 1.txt
more 3232.dat > 2.txt
more 433.dat > 3.txt
So, that the result of more goes into 1.txt... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
7. Shell Programming and Scripting
Some records in a file look like this, with any number of lines between start and end flags:
/Start
Some stuff
Banana 1
Some more stuff
End/
/Start
Some stuff
End/
/Start
Some stuff
Some more stuff
Banana 2
End/
...how would I process this file to find records containing the... (8 Replies)
Discussion started by: cs03dmj
8 Replies
8. Shell Programming and Scripting
Hello, Would someone guide me on how to write a shell script the would search for a phone no using at the end text file using sed or awk and store it in a varaible or print it.
The text file is in this form
text or numbers in first line
text or numbers in second line
.
.
.
Firsname... (6 Replies)
Discussion started by: amuthiga
6 Replies
9. UNIX for Advanced & Expert Users
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Discussion started by: rudoraj
5 Replies
10. Shell Programming and Scripting
I need to total the numbers at the end of script, what code can i use for this to total the lines up?
1232
1242
1234
Total count is 3708 (9 Replies)
Discussion started by: wereyou
9 Replies