09-24-2019
nawk -v host=$HOSTNAME '{
if(match($2,host) && !match($1,"#")) {
if(match($1,"merge"))
print $1"\t"$2"\tM";
else if(match($1,"parser"))
print $1"\t"$2"\tP";
else
print $1" \t"$2"\tX";
} }'
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I need to help on finding the below pattern using sed
<b><a href="/home/document.do?assetkey=x-y-abcde-1&searchclause=photo">
and replace as below in the same line on the index file.
<b><a href="/abcde.html">
thx in advance.
Mari (5 Replies)
Discussion started by: maridhasan
5 Replies
2. Shell Programming and Scripting
Hello All,
I have a string "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031", and I just want to extract LLSV1, but I dont get the expected result when using the sed command below.
# echo "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031" | awk '{print... (4 Replies)
Discussion started by: racbern
4 Replies
3. Shell Programming and Scripting
This is my first post, please be nice. I have tried to google and read different tutorials.
The task at hand is:
Input file input.txt (example)
abc123defhij-E-1234jslo
456ujs-W-abXjklp
From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies
4. Shell Programming and Scripting
i have a file which contains lines like this.
intsrcrpttrn1099mctrl:export GRAPHPARM_AR="-input_code M302023"
intsrcrpttrn1099mload:export GRAPHPARM_AR="-input_code M192023"
intsrcrpttrn1099mload:export GRAPHPARM_AR="-input_code P192023"
the value after -input_code starts with some alphabet... (4 Replies)
Discussion started by: dr46014
4 Replies
5. Shell Programming and Scripting
myfile:
AAAaaa
BBBbbb
CCCccc
AAAeee
DDDddd
how to replace the last AAA as EEEEE using sed?
like this:
AAAaaa
BBBbbb
CCCccc
EEEEEeee
DDDddd (14 Replies)
Discussion started by: vistastar
14 Replies
6. Shell Programming and Scripting
HI Folks,
I'm looking for a solution for this issue.
I want to find the Pattern 0/ and replace it with /. I'm just removing the leading zero. I can find the Pattern but it always puts literal value as a replacement.
What am I missing??
sed -e s/0\//\//g File1 > File2
edit by... (3 Replies)
Discussion started by: SirHenry1
3 Replies
7. Shell Programming and Scripting
Not able to paste my content. Please see the attachment :-( (2 Replies)
Discussion started by: vivek d r
2 Replies
8. Shell Programming and Scripting
I've got a file like so:
...lots of lines, etc.
push "route 10.8.0.0 255.255.255.0"
push "route 192.168.1.123 255.255.255.0"
...lots of lines, etc.
I want to sed find/replace the IP address in the second line, whatever it is, with a new IP address, but I don't want to touch the first line.... (5 Replies)
Discussion started by: DaHai
5 Replies
9. Shell Programming and Scripting
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
10. UNIX for Beginners Questions & Answers
I have a file with multiple lines, all in the same format. For each line, I need to replace the sequence of digits after the last : with a new value, but keep the single quote at the end of the line.
Example:
Input: ( two lines of file)
Name: 'text1:200/text2:1.2.3.4'
Name2:... (19 Replies)
Discussion started by: Beginner101
19 Replies
LEARN ABOUT POSIX
xlsfonts
xlsfonts(1) General Commands Manual xlsfonts(1)
NAME
xlsfonts - server font list displayer for X
SYNOPSIS
xlsfonts [-display host:dpy] [-l] [-ll] [-lll] [-m] [-C] [-1] [-w width] [-n columns] [-u] [-o] [-fn pattern]
DESCRIPTION
xlsfonts lists the fonts that match the given pattern. The wildcard character "*" may be used to match any sequence of characters (includ-
ing none), and "?" to match any single character. If no pattern is given, "*" is assumed.
The "*" and "?" characters must be quoted to prevent them from being expanded by the shell.
OPTIONS
-display host:dpy
This option specifies the X server to contact.
-d host:dpy
Same as -display host:dpy.
-l Lists some attributes of the font on one line in addition to its name.
-ll Lists font properties in addition to -l output.
-lll Lists character metrics in addition to -ll output.
-m This option indicates that long listings should also print the minimum and maximum bounds of each font.
-C This option indicates that listings should use multiple columns. This is the same as -n 0.
-1 This option indicates that listings should use a single column. This is the same as -n 1.
-w width
This option specifies the width in characters that should be used in figuring out how many columns to print. The default is 79.
-n columns
This option specifies the number of columns to use in displaying the output. By default, it will attempt to fit as many columns of
font names into the number of character specified by -w width.
-u This option indicates that the output should be left unsorted.
-o This option indicates that xlsfonts should do an OpenFont (and QueryFont, if appropriate) rather than a ListFonts. This is useful
if ListFonts or ListFontsWithInfo fail to list a known font (as is the case with some scaled font systems).
-fn pattern
This option specifies the font name pattern to match.
SEE ALSO
X(7), Xserver(1), xset(1), xfd(1), X Logical Font Description Conventions
ENVIRONMENT
DISPLAY
DISPLAY must be set to get the default host and display to use.
BUGS
Doing ``xlsfonts -l'' can tie up your server for a very long time. This is really a bug with single-threaded non-preemptable servers, not
with this program.
AUTHOR
Mark Lillibridge
Jim Fulton
Phil Karlton
Roland Mainz
X Version 11 xlsfonts 1.0.4 xlsfonts(1)