01-20-2009
If the content of X is contained in "Y"
I need to print "Yes" else "No"
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi guys, im learning so be gentle...
i'm wanting to write a script to read in a customer number.
in order that the code is robust i want to check
1) the length of the value entered (4 characters)
2) that all characters entered are numeric between the values 1 to 3
3) that a value is... (1 Reply)
Discussion started by: skinnygav
1 Replies
2. Shell Programming and Scripting
Hello everyone, I'm trying the best way to implement a check on a variable ... in particular I need to assess the content of characters and numbers , I tried on various manuals bash scripting but I could not figure out how to do ... any help? (3 Replies)
Discussion started by: ionral
3 Replies
3. Shell Programming and Scripting
I have a shell script that takes a file and uses "syncsort" to sort contents.
I want to add a condition to check whether the input file is textual or binary format. If textual, the "syncsort" will be used to sort the files contents. Otherwise, the sorting process will be skipped.
Note that the... (3 Replies)
Discussion started by: synthea
3 Replies
4. Shell Programming and Scripting
Hi all,
I need to write an automated bash shell script which performs such operations:
1. Grep the header of everyline with the initial of "T" in "FILE_A"
2. Perform a for loop,
Count the numbers of comma in the line of code,
if (no. of comma < 17)
ADD the comma until 17;
... (2 Replies)
Discussion started by: big_nutz
2 Replies
5. AIX
Hi everybody!
I wonder if I could see some text content of a website, via command line...
That could be very helpful, in order to automatize a lot of projects im working on.
thx a lot (2 Replies)
Discussion started by: Datinsky
2 Replies
6. Shell Programming and Scripting
Hi,
I have a text file in the below format.
$cat my_paramater_file.txt
'
$$ETL_EXTRACT_DATE=07/17/2011 17:55:05.000000
'
$
Would like to write script based on the below requirements.
1. The file should not be 0 byte.
2. The content of the file should be 4 lines and the... (1 Reply)
Discussion started by: Alex_Smith
1 Replies
7. Shell Programming and Scripting
Hi All,
I m very new to unix...i jus want to chk the content of file.
ma requirement is
if file has a content then
display it
else
dont display or something
pls specify which loop shalli use either for or while?? (20 Replies)
Discussion started by: navsan
20 Replies
8. Shell Programming and Scripting
I would like to write a shell script to do the following , would advise how to make it ? very thanks
1. Connect LDAP server ( Id : user , password : pass )
2. check the field "user_account_create_date" in the LDAP server , the format of data in this field in LDAP is ABC20130922 ( 22 Sep ,... (3 Replies)
Discussion started by: ust3
3 Replies
9. Shell Programming and Scripting
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
10. Shell Programming and Scripting
Hi all,
i have a logfile which is continuously being updated. I have built a script to check for a specific content and if it is found, it sends a string into a file. Here's the current script:
#!/bin/bash
logfile=/opt/jboss-eap-6.3/standalone/log/server.log
tail -fn0 $logfile | \... (7 Replies)
Discussion started by: nms
7 Replies
LEARN ABOUT X11R4
xpsetcontext
XpSetContext(3Xp) XPRINT FUNCTIONS XpSetContext(3Xp)
NAME
XpSetContext - Sets or unsets a print context with the specified display connection to the X Print Server.
SYNOPSIS
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
void XpSetContext ( display, print_context )
Display *display;
XPContext print_context;
ARGUMENTS
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
print_context
A pre-existing print context on the same X Server.
DESCRIPTION
XpSetContext sets the print context for a display connection. All subsequent print operations that do not explicitly take a print context-
id (for example, XpStartJob) on display will use and act upon the print context set by this call, until the print context is unset or XpDe-
stroyContext is called. The print context can be set and used on multiple jobs, if not destroyed.
If print_context is None, XpSetContext will unset (disassociate) the print context previously associated with display. If there was no pre-
viously associated print context, no action is taken. The content of the formerly associated print context is not affected by this call,
and other display connections may continue to use the print context.
Since font capabilities can vary from printer to printer, XpSetContext may modify the list of available fonts (see XListFonts) on display,
and the actual set of usable fonts (see XLoadFont). A unique combination of fonts may be available from within a given print context; a
client should not assume that all the fonts available when no print context is set will be available when a print context is set.
When a print context is set on a display connection, the default behavior of ListFonts and ListFontsWithInfo is to list all of the fonts
normally associated with the X print server (i.e. fonts containing glyphs) as well as any internal printer fonts defined for the printer.
The xp-listfonts-modes attribute is provided so that applications can control the behavior of ListFonts and ListFontsWithInfo and is typi-
cally used to show just internal printer fonts. Using only internal printer fonts is useful for performance reasons; the glyphs associated
with the font are contained within the printer and do not have to be downloaded.
If the value of xp-listfonts-modes includes xp-list-glyph-fonts, ListFonts and ListFontsWithInfo will include all of the fonts available to
the server that have glyphs associated with them. If the value of xp-listfonts-modes includes xp-list-internal-printer-fonts, then List-
Fonts and ListFontsWithInfo will include all of the fonts defined as internal printer fonts.
When the print context is unset or XpDestroyContext is called, the available fonts on display revert back to what they were previously.
DIAGNOSTICS
XPBadContext A valid print context-id has not been set prior to making this call.
SEE ALSO
XpDestroyContext(3Xp), XpStartJob(3Xp)
X Version 11 libXp 1.0.0 XpSetContext(3Xp)