Search Results

Search: Posts Made By: saeed.soltani
1,486
Posted By saeed.soltani
Yes you right, i tested it on a Mint Linux and it...
Yes you right, i tested it on a Mint Linux and it works!
Thank you guys.
1,486
Posted By saeed.soltani
unfortunately "tr" does not work on my...
unfortunately "tr" does not work on my OS!
1,486
Posted By saeed.soltani
Add a new field at the end of each line
i want to add a white-space at the end of each line for my inp.file, but when i do it, the result is a new line with a white-space between each line!

my input:

2012 0811 1223 15.2 L 38.393 ...
3,418
Posted By saeed.soltani
Thank you very much.
Thank you very much.
3,418
Posted By saeed.soltani
Replace a whole line with "#"
how can i replace the whole line which start with a specific pattern such as "???", with a desired string such as "#" i.e:

in-file:
TAB 20120201 21:02:02
MRD 20121301 22:21:01
??? 201 256
SAS...
1,123
Posted By saeed.soltani
yes, it's a 3d ellipse and i want to draw it in a...
yes, it's a 3d ellipse and i want to draw it in a 2D plane. [in three 2D plane, XY,XZ,YZ]
1,123
Posted By saeed.soltani
Returns points of an ellipse
Hi,
Dose any one know, How can i return a 3D ellipse points if i have these information about the ellipse?
All 3 length of axes, dip of each plane and azimuth of each axes.
i.e., axes length=(1...
1,458
Posted By saeed.soltani
it works perfectly, thank you
it works perfectly, thank you
1,458
Posted By saeed.soltani
Print the first n line in each section
Hi,
i have a file like this:

...
11111111
22222222
33333333
#
4444444
5555555
6666666
7777777
#
...

i want just print the 2 first line between each section (each section is separated...
1,858
Posted By saeed.soltani
perfectly worked! thanks a lot, but could you please axplain berifly how it works
try:
awk '{if (++c % 6 && !d) {e=d=0; print } else {if (++e % 4) {d=1; c=0} else {print "\n"$0; d=e=0}}}' input
1,858
Posted By saeed.soltani
Remove regularly repeated lines
How can i delete some regular repeated lines in a file?
example:
in_file

EDGE 1 2 12
EDGE 2 3 23
EDGE 3 4 34
EDGE 5 6 56
EDGE 6 7 67
EDGE 7 8 78
EDGE 9 10 910
EDGE 10 11 1011
EDGE 11 12...
1,011
Posted By saeed.soltani
split continues lines to separated section with conditions
Hello;
i have a file contains N continues records. i want to split these lines to some separate sections with each lines of a section has the desired condition compared to other sections
input:...
4,419
Posted By saeed.soltani
Fedora 17 i386
Fedora 17 i386
4,419
Posted By saeed.soltani
FIELDWIDTHS problem
Hello;
i have a file contains records such as below, i want to AWK read pre-defined fixed column width and print desired output. so i wrote this command:
input:
Event 9477887 Western Iran
...
829
Posted By saeed.soltani
comparing a field with whole line of another file
Hello;
i have 2 file that each of them contain many records such as below:
file1
2006/01/01 12:36:49.3 37.902 48.482 0.0 1136119009
2006/01/01 13:16:22.9 34.933 46.292 2.0 1136121382...
1,687
Posted By saeed.soltani
split character
how we can split characters of a field? for example if we have a file such like below:
...
20120102 120352.5AM
...
i want to get out put like this:
...
2012 01 02 12 03 52.5 AM
...
2,404
Posted By saeed.soltani
Yes i did, it was a writing mistake. thank you
Yes i did, it was a writing mistake. thank you
2,404
Posted By saeed.soltani
Oh God! Thanks a lot
Oh God! Thanks a lot
2,404
Posted By saeed.soltani
row separator with RS
I have a file contains lines such as below:
HRS ? ? ? Pg ? 20120811 1223 19.6 GAU 1.00e-01 0.00e-01 0.00e-01 0.00e-01
TBZ ? ? ? Pg ? 20120811 1223 26.2 GAU 1.00e-01 0.00e-01 0.00e-01 0.00e-01
### ...
1,252
Posted By saeed.soltani
take a section of a data with conditions
I have a data file like below:
[input]

2011 0701 2015 21.2 L 37.692 46.202 18.0 Teh 4 0.3 2.1 LTeh 1
GAP=233 E
Iranian Seismological Center, Institute of Geophysics, University of Tehran 6...
1,342
Posted By saeed.soltani
Actually i wrote a script just like below: ...
Actually i wrote a script just like below:

#!/bin/bash
rm -r ./gmt/*
rm -r ./loc/*
rm -r ./results/*
rm -r ./time/*
Vel2Grid run_7VM_p
Grid2Time run_7VM_p
Grid2Time run_7VM_s
Time2EQ...
1,342
Posted By saeed.soltani
input(executable file): LOCSEARCH OCT 20 20...
input(executable file):

LOCSEARCH OCT 20 20 10 0.01 10000 5000 0 1
LOCGRID 500 500 40 -300 -300 0 1.0 1.0 1.0 PROB_DENSITY SAVE
LOCMETH EDT_OT_WT 9999.0 4 -1 -1 -1.68 -6 -1.0 1
#LOCMETH...
1,342
Posted By saeed.soltani
Change a field value in a loop
Hi guys, i have an executable file that contains several records and fields. One of the records has a variable filed that must be changed each time i want to execute the file. Would it be possible...
863
Posted By saeed.soltani
Input a file, edit another file
i have 2 files(file1 & file2) that 1st one contains "n" records and the other one contains some scripts. in the file1 which it's records contains 7 fields, i want to read each records and do the...
991
Posted By saeed.soltani
Generate a new field
how can i generate 2 new repetitively fields and put it in another file?
first, i want to generate these fields:
2 1
3 4
4 2
2 1
3 4
4 2
2 1
3 4
4 2
second i want to put these tow fields...
Showing results 1 to 25 of 32

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