Assume I have a text file as below:
me
con pi
ind ken
pras ur
me
con rome
ind kent
pras urs
pintu
con mys
ind pan
pras ki
con kit
ind sys
My requirement,
I need to search for "con rome" and if exists, then print 4th word from rome, i.e in above example, since "con rome"... (4 Replies)
Hey all,
Could any one help me ...
I want to search the word and want the line above it.
eg. mytxt.log
My name is Jeevan.
240 is my address.
My name is Jhon.
390 is my address.
--------
i want to search "240" and want output as
My name is Jeevan.
240 is my address.
... (7 Replies)
Hi All,
I have almost 1000+ files and I want to search specific pattern. Looking forwarded your input.
Search for: word1.word2 (Which procedure contain this word, I need procedure name in output.
Expected output:
procedure test1
procedure test2
procedure test3
procedure test4
... (7 Replies)
Hi,
I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this:
Records
P1
10,23423432
,77:1
,234:2
P2
10,9089004
,77:1
,234:2
,87:123
,9898:2
P3
456456
P1
:123,456456546
P2
abc:324234 (2 Replies)
Hi,
I have this file format and can't seem to think of a solution. I need your help.
I want to return lines which says "Record" if it's ID > 0
file.txt
Record 1:
::::::::::::::::::::::
::::::::::::::::::::::
ID "000001"
::::::::::::::::::::::
::::::::::::::::::::::
... (6 Replies)
I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word description excluding weird characters like $$#$#@$#@***$# and without html tags in the new file output.txt. Help me. Thanx in advance.
My final goal is to... (11 Replies)
Hi All,
Hope you guys had a wonderful weekend
I have a scenario where in which I have to read a file line by line
and check for few words before redirecting to a file
I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
I have a file: file.txt, which contains the following data in it.
This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt
My name is not Karl, my name is Karl Joey
What is your name?
Do you know your name and... (3 Replies)
Guys i need an idea for one logic..in shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
I have a multicolumn text file with header in the first row like this
The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach
for ii in ${hdr}
do
gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT DEBIAN
x_init
X_INIT(1gmt) Generic Mapping Tools X_INIT(1gmt)NAME
x_init - Initialization of Cross-Over Data Bases.
SYNOPSIS
x_init -I
DESCRIPTION
The purpose of x_init is to create two key files that will be holding all the cross-over information for all the cruises tested. These
files are called xx_base.b and xx_legs.b, and they will contain data for each cross-over and totals for each leg, respectively. x_init
will create these two files in the current directory, and write out the fileheader with a 1 as the next record number in the case of
xx_base.b. NB! Any previous files with the same names in the current directory will be erased, so use with caution.
-I Must be present form initialization to take effect.
BEWARE
Both files are binary and have fixed record lengths. The formats of the files are as follows:
xx_base.b:
Record length = 40 bytes.
Rec # 1: fileheader
Rec # 2: pairheader
Next n recs: crossover-structure
Rec # n+3: pairheader etc.
The fileheader is a 40 byte character string where the last 10 bytes contains the record number of the last record in the file. The
pairheader is a 40 byte character string which contains the names of the two legs in question and the number of COEs generated
between them. The crossover-structure contains all the information for one COE, that is lat, lon, time along leg values of gravity,
magnetics, and bathymetry at the cross-over point, the heading of track #1, and the heading of track #2. See program listing for
more details on formats. The file is sequential in that new data are appended at the end of the file.
xx_legs.b:
Record length = 204 bytes.
Each record contains the complete information for each leg that has been checked. The leg-structure contains fields like year of
cruise, number of internal/external COEs for gravity, magnetics, and bathymetry, their means and standard deviations, and the best
fitting regression lines, i.e. the dc-shifts and drift-rates computed from the time/error data points. See program listing for com-
plete description of record format.
SEE ALSO GMT(1), x_system(1)REFERENCES
Wessel, P. XOVER: A Cross-over Error Detector for Track Data, Computers & Geosciences, 15, 333-346.
GMT 4.5.7 15 Jul 2011 X_INIT(1gmt)