Hi there,
I have only been using linux for 2 weeks and am struggling with loops. My data is in the form...
Id like it to output as
25293633
7393500
10578865
25293623
122206254
26797134
41906484
In the current format, if i were to loop it such as 'for i in $start..... would it work or does it need to be in columns? I dont know if the loop im writing is failing because of this or not...
Thanks in advance to anyone who can help :)
Regards
lel
I have only been using linux for 2 weeks and am struggling with loops. My data is in the form...
Code:
[lg45@dev64-mgmt ~]$ echo $start 25293633 7393500 10578865 25293623 122206254 26797134 41906484
25293633
7393500
10578865
25293623
122206254
26797134
41906484
In the current format, if i were to loop it such as 'for i in $start..... would it work or does it need to be in columns? I dont know if the loop im writing is failing because of this or not...
Code:
[lg45@dev64-mgmt ~]$ for i in `seq 1 7`; do awk '{ if($3=10 && '$start'>=25293633 && '$stop'<=26315393) print$0}' map.txt; done
awk: cmd. line:1: { if($3=10 && 25293633
awk: cmd. line:1: ^ unexpected newline or end of string
Regards
lel
Comment