12-02-2005
Got it...
awk '$1 !~ /"0"/' inputfile > outputfile
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all!
A bit of background: I am trying to create a script that formats SQL statements. I have gotten so far as to add new lines based on certain match criteria like commas, keywords etc. In the process, I end up adding newlines where I don't want.
For example: substr(colName, 1, 10)... (3 Replies)
Discussion started by: jayarkay
3 Replies
2. Shell Programming and Scripting
Please guide if you know how to solve this.
I have a tab delimited INPUT FILE where each record is separated by -----
-----
ABC 4935402 4936680 Pattern=Cheers07080.1
ABC 4932216 4932368 Pattern=Cheers07080.1
ABC 4931932 4932122 ... (8 Replies)
Discussion started by: sam_2921
8 Replies
3. Shell Programming and Scripting
I have a huge file (about 2 millions records) contains data separated by “,” (comma). As part of the requirement, I can't change the format. The objective is to remove some of the records with the following condition. If the 23rd field on each line start with 302 , I need to remove that from the... (4 Replies)
Discussion started by: jaygamini
4 Replies
4. Shell Programming and Scripting
Hi Gurus,
I know this'll be simple task for all the geeks out here but me being a newbie is finding it hard to crack this shell.
Ok coming to the task I've a delimited file as below
==================================================
====================================================
... (8 Replies)
Discussion started by: asandy1234
8 Replies
5. UNIX for Dummies Questions & Answers
I have a file.....
xxx 2345 455
abc 345 555
cdf 456 777
fff 555 888
Now my requirement is, Say if, i want to select only those records prior to the record fff 555 888...
how do i go about doing this in unix....
The fff would be hardcoded as it wud be fixed and everytime when i... (7 Replies)
Discussion started by: saggiboy10
7 Replies
6. Shell Programming and Scripting
Hi,
I look for a awk one liner for below issue.
input file
ABC 1234 abc 12345
ABC 4567 678 XYZ
xyz ght 678
ABC 787 yyuu
ABC 789 7890 777
zxr hyip hyu
mno uii 678 776
ABC ty7 888
All lines should be started with ABC as first field. If a record has another value for 1st... (7 Replies)
Discussion started by: ratheesh2011
7 Replies
7. Shell Programming and Scripting
Hi
I need to select lines from a txt file, I have got a line starting with ZMIO:MSISDN= and after a few line I have another line starting with 'MOBILE STATION ISDN NUMBER' and another one starting with 'VLR-ADDRESS' I need to copy these three lines as three different columns in a separate... (3 Replies)
Discussion started by: Tlcm sam
3 Replies
8. Shell Programming and Scripting
Hi All,
I have following input file. I wish to retain those lines which match multiple search criteria. The search criteria is stored in a variable seperated from each other by comma(,).
SEARCH_CRITERIA = "REJECT, DUPLICATE"
Input File:
ERROR,MYFILE_20130214_11387,9,37.75... (3 Replies)
Discussion started by: angshuman
3 Replies
9. Shell Programming and Scripting
Hi Guru's,
I am new to unix scripting. I have a huge file with user details in it(file2) and I have another file with a list of users(file1). Script has to search a user from file1 and get all the associated lines from file2.
Example:
fiel1:
cn=abc
cn=DEF
cn=xyx
File 2:
dn:... (10 Replies)
Discussion started by: Samingla
10 Replies
10. Shell Programming and Scripting
I have two files and would need to filter out records based on certain criteria, these column are of variable lengths, but the lengths are uniform throughout all the records of the file. I have shown a sample of three records below. Line 1-9 is the item number "0227546_1" in the case of the first... (15 Replies)
Discussion started by: MIA651
15 Replies
LEARN ABOUT CENTOS
sample1d
SAMPLE1D(l) SAMPLE1D(l)
NAME
sample1d - Resampling of 1-D data sets
SYNOPSIS
sample1d infile [ -Fl|a|c ] [ -H[nrec] ] [ -Ixinc ] [ -M[flag] ] [ -Nknotfile ] [ -Sxstart ] [ -Tx-col] [ -V ] [ -bi[s][n] ] [ -bo[s][n] ]
DESCRIPTION
sample1d reads a multi-column ASCII [or binary] data set from file [or standard input] and resamples the timeseries/profile at locations
where the user needs the values. The user must provide the column number of the independent (monotonically increasing or decreasing) vari-
able. Equidistant or arbitrary sampling can be selected. All columns are resampled based on the new sampling interval. Several interpola-
tion schemes are available.
infile This is a multi-column ASCII [of binary, see -b] file with one column containing the independent variable (which must be monotoni-
cally in/de-creasing) and the remaining columns holding misc. data values. If no file is provided, sample1d reads from standard
input.
OPTIONS
No space between the option flag and the associated arguments.
-F Choose from l (Linear), a (Akima spline), and c (natural cubic spline) [Default is -Fa]. You may change the default interpolant;
see INTERPOLANT in your .gmtdefaults file.
-H Input file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults file. If used, GMT default
is 1 header record.
-I xinc defines the sampling interval. [Default is the separation between the first and second abcissa point in the infile]
-M Multiple segment file. Segments are separated by a record whose first character is flag. [Default is '>'].
-N knotfile is an optional ASCII file with the x locations where the data set will be resampled in the first column
-S For equidistant sampling, xstart indicates the location of the first output value. [Default is the smallest even multiple of xinc
inside the range of infile]
-T Sets the column number of the independent variable [Default is 0 (first)].
-V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
-bi Selects binary input. Append s for single precision [Default is double]. Append n for the number of columns in the binary file(s).
[Default is 2 (or at least the number of columns implied by -T].
-bo Selects binary output. Append s for single precision [Default is double].
EXAMPLES
To resample the file profiles.tdgmb, which contains (time,distance,gravity,magnetics,bathymetry) records, at 1km equidistant intervals
using Akima's spline, try'
sample1d profiles.tdgmb -I1 -Fa -T1 > profiles_equi_d.tdgmb
To resample the file depths.dt at positions listed in the file grav_pos.dg, using a cubic spline for the interpolation, try
sample1d depths.dt -Ngrav_pos.dg -Fc > new_depths.dt
SEE ALSO
gmt(1gmt), filter1d(1gmt)
1 Jan 2004 SAMPLE1D(l)