05-08-2009
what is the output you are looking for?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I got a sample file like this.
$ cat test
12|13|100|s
12|13|100|s
100|13|100|s
12|13|100|s
I want to replace all 100 by 2000 only in 3rd field using "awk"
This is replacing all 100's :-(
$ awk -F "|" '{gsub( /100/,"2000");print}' test
12|13|2000|s
12|13|2000|s
2000|13|2000|s... (5 Replies)
Discussion started by: jkl_jkl
5 Replies
2. Shell Programming and Scripting
hi,
let's say $numbers = "324 350 587" an so on...
what i'm trying to do is this:
awk -v numbers="$numbers" '{if (numbers ~ /$2/) print $0, "bla bla"}' file
# file looks like this:
214 .....
215 ...
216 ....
250
...
324
325
...
350 something ...
...
587 ... (4 Replies)
Discussion started by: someone123
4 Replies
3. Shell Programming and Scripting
using awk convert 3 rd fileld of file as 5 digit and then display changed file.
like
1 2
23445 3452 3343
3 5 6 6
================
o/p:-
1 2
23445 3452 03343
3 5 00006 6 (1 Reply)
Discussion started by: RahulJoshi
1 Replies
4. Shell Programming and Scripting
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
Discussion started by: right_coaster
4 Replies
5. Shell Programming and Scripting
Hi ,
I have the file where i have to search for the pattern. The pattern may be lower case or upper case or camel case. Basically I want to ignore while searching the pattern in awk.
awk '/error|warning/exception/' filename
Please help me (3 Replies)
Discussion started by: arukuku
3 Replies
6. Shell Programming and Scripting
awk 'BEGIN{IGNORECASE=1} /error|warning|exception/ { ++x } END { print x }' filename
The above command returning the number of times the pattern present in the file. But I want the the line number as well. please help me out (6 Replies)
Discussion started by: arukuku
6 Replies
7. UNIX for Dummies Questions & Answers
Hi !
I have a tab-delimited file, file.tab:
Column1 Column2 Column3
aaaaaaaaaa bbtomatoesbbbbbb cccccccccc
ddddddddd eeeeappleseeeeeeeee ffffffffffffff
ggggggggg hhhhhhtomatoeshhh iiiiiiiiiiiiiiii
... (18 Replies)
Discussion started by: lucasvs
18 Replies
8. Shell Programming and Scripting
Hi All,
i have an output of command vmstat as below :
$ vmstat
System configuration: lcpu=4 mem=5376MB ent=1.00
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------------------
r b avm fre re pi... (10 Replies)
Discussion started by: omkar.jadhav
10 Replies
9. Shell Programming and Scripting
In the awk I am trying to add :p.=? to the end of each $9 that matches the pattern NM_. The below executes andis close but I can not seem to figure out why the :p.=? repeats in the split as in the green in the current output. I have added comments as well. Thank you :).
file
... (4 Replies)
Discussion started by: cmccabe
4 Replies
10. Shell Programming and Scripting
Hi
I am using awk to print 10,11 column but it is not displaying required output.
Please let me know how I can browse through the line and extract the required one
Example: I have below 2 lines in file
seq 49960| Thu Apr 19 10:57:40.726182 2018|Len: 89|GAP for CL/U18 9P-NC (CL90U8)) gap... (10 Replies)
Discussion started by: sdosanjh
10 Replies
T1MAC(1) General Commands Manual T1MAC(1)
NAME
t1mac - translate a PFA or PFB PostScript Type 1 font into Macintosh format
SYNOPSIS
t1mac [--macbinary | --applesingle | --appledouble | --binhex | --raw] [--filename name] [input [output]]
DESCRIPTION
t1mac reads a PFA (hexadecimal) or PFB (binary) PostScript Type 1 font file and generates an equivalent Macintosh Type 1 font file. The
output file can be in MacBinary II, AppleSingle, AppleDouble, or BinHex format, or it can be a raw resource fork. The default is MacBinary
II; use an option to choose a different format. If the output file is not specified output goes to the standard output.
WARNING: The output of t1mac is not sufficient to use the font, since Macintoshes can't read raw Type 1 fonts. You will need to create a
font suitcase containing bitmap fonts if you do not have such a suitcase for the font already. t1mac cannot help you do this.
OPTIONS
--raw, -r
Indicates that output should be a raw resource fork.
--macbinary
Indicates that output should be in MacBinary I or II format. This is the default.
--applesingle
Indicates that output should be in AppleSingle format.
--appledouble
Indicates that output should be in AppleDouble format.
--binhex
Indicates that output should be in BinHex 4.0 format.
--filename=name, -n name
Sets the Macintosh filename of the output font to name. The default is to construct the filename from the font's name using estab-
lished Macintosh conventions. This option is not useful when output is a raw resource fork.
SEE ALSO
t1unmac(1), t1ascii(1), t1binary(1), t1asm(1), t1disasm(1)
AUTHORS
Eddie Kohler (ekohler@gmail.com)
Version 1.37 T1MAC(1)