01-27-2010
Exactly
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
2. Shell Programming and Scripting
I am attempting to write a awk script that reads in a file after awk array elements are assigned and using those elements while reading in the new file. Does this make sense?
/pattern/ {tst=$3}
(( getline < "file" ) > 0 ) {
x=x " "tst
}
When I print tst in the END statement it... (9 Replies)
Discussion started by: timj123
9 Replies
3. Shell Programming and Scripting
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
6. Shell Programming and Scripting
Hi experts ,
I am trying to get the below output:
file :
0/6/4/1 0x0019503C2E26 5 UP lan5 snap5 1 ETHER Yes 224
0/6/4/0 0x0019503C2E25 6 UP lan6 snap6 2 ETHER Yes 224
0/2/1/0 0x0019503E6900 0 UP lan0 snap0 3 ETHER Yes 224... (8 Replies)
Discussion started by: rveri
8 Replies
7. Shell Programming and Scripting
Hi,
I am on a Solaris8 machine
If someone can help me with adjusting this awk 1 liner (turning it into a real awkscript) to get by this "event not found error"
...or
Present Perl solution code that works for Perl5.8 in the csh shell ...that would be great.
******************
... (3 Replies)
Discussion started by: andy b
3 Replies
8. Shell Programming and Scripting
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies
9. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
10. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT HPUX
xdrawlines
XDrawLines() XDrawLines()
Name
XDrawLines - draw multiple connected lines.
Synopsis
XDrawLines(display, drawable, gc, points, npoints, mode)
Display *display;
Drawable drawable;
GC gc;
XPoint *points;
int npoints;
int mode;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
drawable Specifies the drawable.
gc Specifies the graphics context.
points Specifies a pointer to an array of points.
npoints Specifies the number of points in the array.
mode Specifies the coordinate mode. Pass either CoordModeOrigin or CoordModePrevious.
Description
XDrawLines() draws a series of lines joined end-to-end.
It draws lines connecting each point in the list (points array) to the next point in the list. The lines are drawn in the order listed in
the points array. For any given line, no pixel is drawn more than once. If thin (zero line width) lines intersect, pixels will be drawn
multiple times. If the first and last points coincide, the first and last lines will join correctly. If wide lines intersect, the inter-
secting pixels are drawn only once, as though the entire multiline request were a single filled shape.
There is a limit to the number of lines that can be drawn in a single call, which varies according to the server. To determine how many
lines you can draw in a single call, find out your server's maximum request size using XMaxRequestSize(). Subtract three and divide by
two, and this is the maximum number of lines you can draw in a single XDrawLines() call.
The mode argument may have two values:
o CoordModeOrigin indicates that all points are relative to the drawable's origin.
o CoordModePrevious indicates that all points after the first are relative to the previous point. (The first point is always relative to
the drawable's origin.)
XDrawLines() uses the following components of the specified graphics context to draw multiple connected lines in the specified drawable:
function, plane_mask, line_width, line_style, cap_style, join_style, fill_style, subwindow_mode, clip_x_origin, clip_y_ origin, and
clip_mask. This function also uses these graphics context mode-dependent components: foreground, background, tile, stipple, ts_x_origin,
ts_y_origin, dash_offset, and dashes.
For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.
Structures
typedef struct {
short x, y;
} XPoint;
Errors
BadDrawable
Specified drawable is invalid.
BadGC Specified GC is invalid, or does not match the depth of drawable.
BadMatch Specified drawable is an InputOnly window.
BadValue Invalid coordinate_mode.
See Also
XClearArea(), XClearWindow(), XCopyArea(), XCopyPlane(), XDraw, XDrawArc(), XDrawArcs(), XDrawFilled(), XDrawLine(), XDrawPoint(), XDraw-
Points(), XDrawRectangle(), XDrawRectangles(), XDrawSegments(), XFillArc(), XFillArcs(), XFillPolygon(), XFillRectangle(), XFillRectan-
gles().
Xlib - Drawing Primitives XDrawLines()