Hi All,
file_1.txt contains
aaa bbbb hhhh
vvvvv mmmmm iiiii
What i want is to search for the first coloumn of each line using awk.i.e as below:
awk '/aaa/ {printf(<>)}' file_1.txt
The print part (<>) should contain all the values(or coloumns ) in the particular line(here it... (8 Replies)
How do we pass multiple arguments into awk :
name=john
age=12
now i have to pass both age and name into awk.. how to do it?
like : awk -v var=... (4 Replies)
Hi
I have a file which looks like this:
$ cat my_file
f1acc: 1398
f1pdb: 495
f1trn: 1288
f1txn: 7326
t1trn: 8241
t1txn: 8292
p080$
I am trying to "egrep" a certain pattern from this file and put a value of a variable in front of each line, for example:
pnum=555
cat my_file |... (5 Replies)
I am trying to pass max as a sommand line argument when I call awk.
Made the modification in the BEGIN but it is not working
I'm getting an error as below:
awk: txsrx.awk:82: (FILENAME=jcd.tx FNR=4161) fatal: cannot open file `40' for reading (No such file or directory)
Somehow it... (2 Replies)
I have an awk script below which I call using for example
awk -f ../../A-Scripts/select-model.awk iterations.txt 16x12 10
I want to be able to use it in a different way like this
awk -f ../../A-Scripts/select-model.awk iterations.txt nxz=16x12 iter=10
or
awk -f... (1 Reply)
I have an awk script where I pass some arguments
For example I will call awk in this fashion
awk -v anomaly=nAmon/pAnom -v aloc=zmin/ztran/zmax -v modeldepth=modeldepth
My problem is that I want to have the option to pass the variable anomaly in two ways.
Either using
-v... (10 Replies)
Hi guys,
I work in ksh and have a file in the following format:
T 18:30 10 23:00 ts1632back
W 18:30 10 23:00 ts1632back
M 19:30 0 0 tschkback_px1632
T 19:30 0 0 tschkback_px1632
I am using the following 'awk' command to substitute field/colomn 2 across the file if field/colomn 5 is set to... (6 Replies)
Hello all,
I would like to output a random number within a range for every line using awk and shuf. I think I'm almost there, but I don't know how to pass arguments to shuf within my awk script:
Input
1 12190 12227
1 12595 12721
1 13403 13639
1 14362 14829
1 14970 15038
awk:
awk '{... (2 Replies)
Hi,
I am in critical need of help, Thanks a ton for your help.
I need to know how to pass the shell argument into nawk code in AIX. so that my file gets passed into that awk script and it can execute it part.
To be detail, i have more than 100 files and in those files a particular field... (6 Replies)
# more minusf.awk
#!/bin/awk -f
BEGIN {
FS=":";
}
{
if ( $2 == "" ) {
print $1 ": no password!";
}
}
# ./minusf.awk aa aa aa aa
awk: can't open aa (6 Replies)
Discussion started by: sri.phani
6 Replies
LEARN ABOUT DEBIAN
txt2pdbdoc
txt2pdbdoc(1) General Commands Manual txt2pdbdoc(1)NAME
txt2pdbdoc - Text to Doc file converter for Palm Pilots
SYNOPSIS
txt2pdbdoc [-b] [-c] [-v] document-name file.txt file.pdb
txt2pdbdoc -d [-D] [-v] file.pdb [ file.txt ]
txt2pdbdoc -V
DESCRIPTION
txt2pdbdoc converts a plain text file to a Doc(4) file in PDB (Pilot Database) format used by all models of the Palm Pilot. (It can also
convert a Doc file to plain text.) Resultant PDB files can be downloaded directly to a Pilot during a HotSync.
The document-name is used in the Document List view of a Doc reader application on the Pilot.
OPTIONS -b Ordinarily, characters with an ASCII code less than 9 are removed and both carriage-returns and form-feeds are converted to newlines.
This option suppresses that behavior.
-c Ordinarily, text is compressed. This option suppresses compression.
-d Decode the given Doc file to text either to a file or to standard output if no file is specified.
-D Do not check the file type/creator of the file to decode. This option should be specified only if you know for sure that the file is
in fact some sort of Doc file. Attempting to decode non-Doc files will result in undefined behavior and quite possibly crash.
-v Verbose mode. For encoding, print progress and compression statistics per 4K of text to standard error as well as overall statistics
when completed; for decoding, print progress in a ``countdown'' style.
-V Print the version number of txt2pdbdoc to standard output and exit.
EXAMPLE
To convert a text file to Doc file:
txt2pdbdoc 'Through the Looking Glass' alice.txt alice.pdb
EXIT STATUS
Exits with one of the values given below:
0 Success.
1 Error in command-line options or use.
2 Unable to open source file.
3 Unable to open destination file.
4 Unable to read file.
5 Unable to write file.
6 File is not a Doc file.
7 Doc file uses unknown compression type.
CAVEATS
1. Document names are limited to 31 characters in PDB format. Longer names are truncated but have the 29-31st characters replaced by
``...'' to indicate truncation.
2. The command isn't called ``txt2doc'' to avoid confusion about possibly having anything to do with Microsoft Word documents that use the
.doc extension.
SEE ALSO html2pdbtxt(1), pdbtxt2html(1), doc(4), pdb(4)AUTHOR
Paul J. Lucas <pauljlucas@mac.com>
txt2pdbdoc January 21, 2005 txt2pdbdoc(1)