The following variant does a precise lookup (to supress duplicates),
and does not need an array of delimiters:
This is a good demonstration of a function
This User Gave Thanks to MadeInGermany For This Post:
Hello all,
Would appreciate if someone can help me out on the following requirement.
INPUT FILE:
--------------------------
TPS REPORT
abc def ghi
jkl mon pqr
stu vrs lll
END OF TPS REPORT
TPS REPORT
field1 field2 field3
field4 field5 field6 (8 Replies)
I have a file has following records
policy glb id 1233 name Permit ping from "One" to "Second" "Address1" "Any" "ICMP-ANY" permit
policy id 999251
service "snmp-udp"
exit
policy glb id 1234 name Permit telnet from "One" to "Second" "Address2" "Any" "TCP-ANY" permit
policy id 1234... (3 Replies)
When parsing multiple fields in a file using AWK, how do you group by one of the fields and parse by delimiters?
to clarify
If a file had
tom | 223-2222-4444 , randofield
ivan | 123-2422-4444 , random filed
... | and , are the delimiters ...
How would you group by the social security... (4 Replies)
input:
ref.1;rack.1;1 #group1
ref.1;rack.1;2 #group1
ref.1;rack.2;1 #group2
ref.2;rack.3;1 #group3
ref.2;rack.3;2 #group3
ref.2;rack.3;3 #group3
Among records from same group (i.e. with same 1st and 2nd field - separated by ";"), I would need to keep the last record... (5 Replies)
Hi,
I am trying to execute this line
awk -F ";" -v OFS=";" '{gsub(/\./,",",$6); print}' FILE
but for multiple fields $6 $7 $8
Do you have a suggstion?
Tried:
awk -F ";" -v OFS="";"" "function GSUB( F ) {gsub(/\./,\",\",$F); print} { GSUB( 6 ); GSUB( 7 ); GSUB( 8 ) } 1"... (2 Replies)
Can you please help me with this ....
Input File
share "FTPTransfer" "/v31_fs01/root/FTP-Transfer" umask=022 maxusr=4294967295 netbios=NJ09FIL530
share "Test" "/v31_fs01/root/Test" umask=022 maxusr=4294967295 netbios=NJ09FIL530
share "ENR California" "/v31_fs01/root/ENR California"... (14 Replies)
Hi,
input:
AA|BB|CC
DD|EE
FF
what I am trying to get:
AA|BB|CC
DD|EE|
FF||
I tried to create first an UDF for printing repeats, but I think I have an issue with my END section or my array:
function repeat(str, n, rep, i)
{
for(i=1 ;i<n;i++)
rep=rep str
return rep
}
... (6 Replies)
Hi,
I want to know if there is any simple approach to SUM a field based on group by of different fields
for e.g.
file1.txt contains below data
20160622|XXX1||50.00||50.00|MONEY|Plan1|
20160622|XXX1||100.00||100.00|MONEY|Plan1|
20160623|XXX1||25.00||25.00|MONEY|Plan1|... (3 Replies)
so its common knowledge one can print multiple fields with simple commands like this:
echo 12 44 45 552 24 | awk '{print $1,$4,$3}'
but suppose i want to avoid specifying the "$" symbol. is that possible? can something like this be done:
echo 12 44 45 552 24 | awk '{print $(1,4,3)}'
... (9 Replies)
Hello all, I am having trouble with what should be an easy task, but seem to be missing something fundamental. I have two files, with File 1 consisting of a single field of many thousands of records. I also have File 2 with two fields and many thousands of records.
My goal is that when $1 of... (2 Replies)
Discussion started by: jvoot
2 Replies
LEARN ABOUT LINUX
pango-view
PANGO-VIEW(1) User Commands PANGO-VIEW(1)NAME
pango-view - Pango text viewer
DESCRIPTION
Usage:
pango-view [OPTION...] - FILE
Help Options:
-h, --help
Show help options
--help-all
Show all help options
--help-cairo
Options understood by the cairo backend
Cairo backend options:
--annotate=1 or 2
Annotate the output
Application Options:
--no-auto-dir
No layout direction according to contents
--backend=cairo/xft/ft2/x
Pango backend to use for rendering (default: cairo)
--background=red/#rrggbb/#rrggbbaa/transparent
Set the background color
-q, --no-display
Do not display (just write to file or whatever)
--dpi=number
Set the resolution
--align=left/center/right
Text alignment
--ellipsize=start/middle/end
Ellipsization mode
--font=description
Set the font description
--foreground=red/#rrggbb/#rrggbbaa
Set the text color
--gravity=south/east/north/west/auto
Base gravity: glyph rotation
--gravity-hint=natural/strong/line
Gravity hint
--header
Display the options in the output
--height=+points/-numlines
Height in points (positive) or number of lines (negative) for ellipsizing
--hinting=none/auto/full
Hinting style
--indent=points
Width in points to indent paragraphs
--justify
Align paragraph lines to be justified
--language=en_US/etc
Language to use for font selection
--margin=CSS-style numbers in pixels
Set the margin on the output in pixels
--markup
Interpret text as Pango markup
-o, --output=file
Save rendered image to output file
--pangorc=file
pangorc file to use (default is ./pangorc)
--pixels
Use pixel units instead of points (sets dpi to 72)
--rtl Set base direction to right-to-left
--rotate=degrees
Angle at which to rotate results
-n, --runs=integer
Run Pango layout engine this many times
--single-par
Enable single-paragraph mode
-t, --text=string
Text to display (instead of a file)
--version
Show version numbers
--waterfall
Create a waterfall display
-w, --width=points
Width in points to which to wrap lines or ellipsize
--wrap=word/char/word-char
Text wrapping mode (needs a width to be set)
Pango module interface version: 1.6.0
pango-view (pango) 1.30.0 March 2012 PANGO-VIEW(1)