data.txt
to print from a point in this file, to the end of the file, i type:
the value "August 09 17:22" is a value supplied by the user to the script, from the command line. So since the user supplied that value, and that value actually existed in the data.txt file, when i typed the awk command, i got an output back.
now, what happens if the user supplied a value that doesn't exist?
You'll get no response.
what i've been stuck on is, when the date supplied by the user does not exist in the data file, i want awk to grab the date that is the closest to the date the user supplied.
In this case, since "August 09 17:18 2013" was not found, the date that should have been grabbed instead should be "August 09 17:17 2013". And awk should print from that line to the end of the file.
I have a csv file as given below,
org1 org2 org3 org4 org5
gene1 100 80 90 80 150
gene2 30 70 50 50 115
gene3 40 120 60 40 105
gene4 20 72 40 60 20
I need to replace the fields are having values greater than 100 with "TRUE". I used the following commands to replace... (6 Replies)
Hi,
I noticed a weird behaviour with awk.
input:
A|B|1-100|blabla_35_40_blabla;blabla_53_60_blabla;blabla_90_110_blabla
Objective:
For each string separated by ';' in $4, if the first and second numbers are included in the interval in $3, then print "TRUE". Otherwise print "FALSE".
In... (3 Replies)
Hi,
i need to find one of the value from my file is in between two numbers, that is the value is greater than 34 and smaller than 50,
Ex: File.txt
col1 col2 col3 col4
1 Name1 93 w
2 Name2 94 a
3 Name3 32 b
4 Name4 45 x
5 Name5 50 y
6 Name6 49 z
here i need to find col3 values are... (7 Replies)
Hi all,
I have a tab-delimited text file of size 10Mb. I am trying to count the number of lines using,
grep -c . sample.txtor
wc -l < sample.txt or
awk 'END {print NR}' sample.txtAll these commands shows the count as 1, which means they are reading only the first header line of the file.... (3 Replies)
Hi All,
I am running a command from a remote server using ssh to different servers. I will get a output like below with 4 columns. I want to grab line which is having a coulmn which grate than or equal to 50. How can I do it with Awk or sed ??. I add a space to first row with sed 's/::/:: /g' to... (4 Replies)
Hello all
Hoping someone would be kind enough to suggest a solution to a problem i have, and see if maybe i can even do this without a script.
Essentially i have a very large log file, and within it each line had a value called TTMT, and it records a variable number in the following way, so... (6 Replies)
Hi I am posting here for the first time. I am trying to write a script that reads a data file and tries to determine if any absolute values that are above 0.5
I was thinking it ought to be possible to do this with awk somehow. Are there any suggestions before I start reinventing the wheel?
... (4 Replies)
Sorry for such a basic question, but I have spent hours trying to work this out! I need an awk command (or similar) that will look at a text file and output to the screen if the 4th column of each line has a value greater than or equal to x.
data.txt
This is the 1 line
This is the 2 line
This... (6 Replies)
I need to grep out usernames with UID's greater than 200 out of the /etc/passwd file for a server migration. It is the third field however I am not sure to to accomplish this. I tried to search the forums but did not seem to find an answer (might have over looked it). Any help would be... (2 Replies)