10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi guys,
Appreciate your help as I am stuck with searching the logs for last 30 minutes from the current time. Current time is time when you execute the script and it will search for <string> through the logs for last 30 minutes only and if <string> found then print those lines only.
The... (18 Replies)
Discussion started by: rockstar
18 Replies
2. Shell Programming and Scripting
I have a large file that I need to print certain sections out of.
file.txt
/alpha/beta/delta/gamma/425/590/USC00015420.blah.lt.0.01.str:USC00015420Y2017M10BLALT.01 12 13 14 -9 1 -9 -9 -9 -9 -9 1 2 3 4 5 -9 -9
I need to print the "USC00015420" and... (5 Replies)
Discussion started by: ncwxpanther
5 Replies
3. Shell Programming and Scripting
How do I use multiple field separators in awk?
I know that if I use awk -F"", both a and b will be field separators. But what if I need two field separators that both are longer than one letter?
If I want the field separators to be "ab" and "cd", I will not be able to use awk -F"". The ... (2 Replies)
Discussion started by: locoroco
2 Replies
4. Shell Programming and Scripting
Hi,
I have a file with colon separated values like below. How can i get those lines whose third field is 0 (zero). In the below example, lines starting with stapler and tempo has its third field as 0
$ cat list.txt
galaxy:b:5:world
stapler:a:0:hello
abc:a:4:stomper
kepler:uic:5:jam... (8 Replies)
Discussion started by: John K
8 Replies
5. UNIX for Dummies Questions & Answers
I have files such as
n02-z30-dsr65-terr0.25-dc0.008-16x12drw-run1.cmd
I am wondering if it is possible to define two field separators "-" and "."
for these strings so that $7 is run1. (5 Replies)
Discussion started by: kristinu
5 Replies
6. UNIX Desktop Questions & Answers
Hi Guys,
I have small dilemma which I could do with a little help solving . I currently have text HDD S.M.A.R.T report which I have pasted below:
smartctl 5.39 2008-10-24 22:33 (openSUSE RPM)
Copyright (C) 2002-8 by Bruce Allen, http://smartmontools.sourceforge.net
Device: COMPAQ... (2 Replies)
Discussion started by: bikerben
2 Replies
7. Shell Programming and Scripting
I have a file with content as shown below.
cat t2 :
100,100,"X",1234,"12A",,,"ab,c"
Comma is the field seperator, however string fields will be within double quotes and comma within double quotes should not be treated as field seperator.
I am trying to replace this field seperator to a... (7 Replies)
Discussion started by: mk1216
7 Replies
8. Shell Programming and Scripting
I saw a couple of posts here referencing how to handle more than one input field separator in awk. I figured I would share how I (just!) figured out how to turn this line in a logfile:
90000000000000000000010001 name... (4 Replies)
Discussion started by: kinksville
4 Replies
9. Shell Programming and Scripting
I need help counting the fields and field separators using Nawk.
I have a file that has multiple lines on it and I need to read the file 1 at a time and then count the fields and field separators and then store those numbers in variables. I then need to delete the first 5 fields and the blank... (3 Replies)
Discussion started by: scrappycc
3 Replies
10. Shell Programming and Scripting
Hi Guys,
I'm tying to split a line similar to this:YO6-2000-30.htm: (3 properties found).......into separate columns, so effectively I need to check for a -, ., :, a tab and a space in the statement.
Any help would be appreciated
Thanks! (7 Replies)
Discussion started by: Tonka52
7 Replies