Search Results

Search: Posts Made By: Lucas_0418
11,709
Posted By MadeInGermany
In the previous awk scripts you can exchange the...
In the previous awk scripts you can exchange the /|3078=/ or $0~/|3078=/ by "|"$0~/|3078=/,
then the search works for any field including field#1.
1,033
Posted By MadeInGermany
In a while loop we read the input file line by...
In a while loop we read the input file line by line, and write each line to the output file.
We associate descriptors 3 & 4 rather than the default 0 & 1, so another read/print (for interactive i/o)...
3,707
Posted By ibmtech
Can you tell us, what port no did you/he assigned?
Can you tell us, what port no did you/he assigned?
11,709
Posted By clippertm
Hello Lucas, Thanks again for your help! ...
Hello Lucas,

Thanks again for your help!

It works with data1-2.txt, but then if I change '3078=' to '5022=", it returns the below:



I tried to re-arrange the command but with no success :(
1,951
Posted By Ganesh L
Very nice. i can able to do. it is working fine....
Very nice. i can able to do. it is working fine. Thanks a lot....
Forum: Programming 03-21-2014
2,579
Posted By malandisa
Hi SriniShoo, and all, Thank you very much...
Hi SriniShoo, and all,

Thank you very much for your reply and it is taking me somewhere. I have taken time to come back and say thanks cause I have been trying to digest your solution. The first...
11,709
Posted By clippertm
Sample files!
Sample files!
1,487
Posted By Scrutinizer
@Lucas, there would be an issue still if the...
@Lucas, there would be an issue still if the field2 in the last line is 0...
3,284
Posted By Scrutinizer
For example. Here sort is called as an external...
For example. Here sort is called as an external program from within awk
awk '{print | "sort"}' file

Here the output of awk is ran through sort through a pipeline..
awk '{print}' file | sort
1,185
Posted By Scrutinizer
Awk approach with fixed strings: awk '$1=="b"...
Awk approach with fixed strings:
awk '$1=="b" && k=="a" {print p ORS $0}{p=$0; k=$1}' file


--
@lucas: nice sed. \{1,\} can be left out, no?


*edit* it could also be done like this.
sed...
1,185
Posted By patrick87
Execution problem with print out record that follow specific pattern
Hi,

Do anybody know how to print out only those record that column 1 is "a" , then followed by "b"?
Input file :

a comp92 2404242 2405172
b comp92 2405303 2406323
b ...
1,602
Posted By anbu23
Replace echo with this printf printf...
Replace echo with this printf
printf "%02d:%02d" $m $i
Forum: Linux 02-20-2014
50,218
Posted By MadeInGermany
You can pass the local script via stdin to the...
You can pass the local script via stdin to the interpreter on the remote host.
Example bash script:
ssh -l username remotehost /bin/bash < test.sh
1,746
Posted By Scrutinizer
@Lucas_0418: It is better to not leave the format...
@Lucas_0418: It is better to not leave the format argument of printf unspecified. Also if you use [@] instead of
you do not need to use tr and you could just do this:
printf "%s\n" "${DATE[@]}"...
168,748
Posted By Perderabo
Days Elapsed Between 2 Dates
We really don't (yet) have a posting that addresses the general problem of number of days between two dates. So I have just finished what should be the last date calculation script that I ever...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 10:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy