Search Results

Search: Posts Made By: oreka18
1,671
Posted By oreka18
take a look at 1st field of 1st line of your test...
take a look at 1st field of 1st line of your test [2006], it's one space to the left and this is the cause that shows your script works! change it and see that it doesn't work!
924
Posted By oreka18
I'm so sorry but believe me I'm trying myself...
I'm so sorry but believe me I'm trying myself but I'm at the beginning of learning also I'm trying learning Fortran to compare differences between languages, by the way thank you very much, i...
924
Posted By oreka18
Put the appropriate value if reached the condition
i have a file as below:
? ? ? ? 20060101
DHR ? ? ? ? 20060101 1316 30.90
KOM ? ? ? ? 20060101 1317 7.20
DHR ? ? ? Pg ? 20060101 1316 27.32
DHR ? ? ? Sg ? 20060101 1316 30.52

? ? ? ?...
1,671
Posted By oreka18
it doesn't work when i test it the out put file...
it doesn't work when i test it the out put file is empty! please test youe script one more time on the original file :<[in_file]>
3,103
Posted By oreka18
thanks but there is no output! did you test it on...
thanks but there is no output! did you test it on the data that i leaved on previews section?
1,671
Posted By oreka18
Delete a section of a file if...
i have a file as below that has n section [here there is 2 section]:
[in_file]
2006 0101 1236 49.3 L 37.902 48.482 0.0 Teh 5 0.2 2.7LTeh 1
GAP=238 ...
2,737
Posted By oreka18
i do your script in my file but it doesn't work! ...
i do your script in my file but it doesn't work!
in_file:

456

654654

6545


your script:

sed 's/^$/###'

and the output was:

456

654654
3,103
Posted By oreka18
thank you very much, now i want to print each...
thank you very much, now i want to print each line which the 5th field of that contains stings "*P,P*" or "*s,S*" {P,S,Pg,Sg,Pn,Sn} without losing blank lines.
3,103
Posted By oreka18
but my input file and output file are? ...
but my input file and output file are?
[orginal_file]
2006 0101 1236 49.3 L 37.902 48.482 0.0 Teh 5 0.2 2.7LTeh 1
GAP=238 ...
3,103
Posted By oreka18
oh I'm sorry, i forget to tell to you. it's...
oh I'm sorry, i forget to tell to you. it's fedora 13.
actually in my original file there is no "###" between section maybe it occur such that problem
3,103
Posted By oreka18
thanks alot but there is a little problem: the...
thanks alot but there is a little problem:
the output of your script contains the values of 1st field (header must be deleted):
? ? ? ? 20060101
GHG ? ? ? ? 20060101 1316 44.78
LIN ? ? ? ?...
2,737
Posted By oreka18
reply
non of them doesn't work!!!:(
2,737
Posted By oreka18
Insert a string instead of blank lines
how can i insert a string sush as "###" instead of blank lines in a file?
i try this code but it doesn't work!
awk 'NF<1 {$1=="###" ; print$0}' in_file > out_file
3,103
Posted By oreka18
because i don't writing scripts with this...
because i don't writing scripts with this function, I'm learning awk.
3,103
Posted By oreka18
thank you so much, but could you please write an...
thank you so much, but could you please write an awk, csh or bash script to do that?
3,103
Posted By oreka18
Copy a field into n line in another place
I have a file contains 100 section (here i show 2 section of that); i want to replace date from 1st & 2nd field of 1st line of each section (1st line of each section is header and the other lines...
1,276
Posted By oreka18
print whole line if the 1st field contains...
i want to print lines in a file that the 1st field of each line has a Date shape such:
yy/mm/dd


or on the other hand contains slash "/" .
1,775
Posted By oreka18
stay without change
stay without change
1,775
Posted By oreka18
Make a new field with a word on it
i have a file contains as below:
[file]:
12 32 qw
21 44 qq
###
11 90 er
88 23 sa
###
i want to add new field with constant string "madd" between 2nd field and 3rd field of each record, so the...
1,395
Posted By oreka18
yes after merging the output file must be the...
yes after merging the output file must be the same as input files

---------- Post updated at 07:45 AM ---------- Previous update was at 07:39 AM ----------




thanks but there is a problem,...
1,395
Posted By oreka18
search & merg data from 3 files
i have 3 files which contains as below (example):
yy-mm-dd hh:mm:sec lat lon depth mag

[file_1]2006-01-01 23:17:26.80 39.8405 41.8795 2.0 3.3
2006-01-06 00:10:26.80 ...
1,221
Posted By oreka18
separate records
i have a file contains continues records; i want to separate each section that has the same 1st field by putting ''###''.
[input file]
1 salam_32 tr po
1 sed_po wqu
1 Pdot. food 32
2 eeeelll
2...
981
Posted By oreka18
Thank you
well done, thamks a lot:)
981
Posted By oreka18
input a file editing it, output it.
i have a file that contains such earthquake data, i want to write an AWK or SED script to input it and fix it (delete each section header delete some field, delete some blank lines and put ###...
1,291
Posted By oreka18
multiple action!
lets explain it easy by showing the initial file and desired file:
I've a file such this that contains:
initial_file:
31/12/2011 23:46:08 38.6762 43.689 14.16 Ml 3.1
...
Showing results 1 to 25 of 25

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