10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Below is my code where i tried using table tag to print out put in table but its not working
#!/bin/ksh
#] && . ./.profile 2>/dev/null
if test -f '.profile'; then . ./.profile; fi;
#. .profile
LOG_DIR=/app/rpx/jobs/scripts/just/logs
sendEmail()
{
pzCType="$1";... (5 Replies)
Discussion started by: ankit.mca.aaidu
5 Replies
2. Shell Programming and Scripting
For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons.
I have simple list of 3 files in a directory that are named like this:
bash-3.2$ ls -1 file*
file1
file1 part2... (2 Replies)
Discussion started by: ckmehta
2 Replies
3. Programming
Dipping around in python again and need to create a def that will populate a list(content) with the files that os.walk finds from within this directory and then I will re.search through each files looking for content. In learning Python, can someone point me in the right direction. This is what I... (3 Replies)
Discussion started by: metallica1973
3 Replies
4. UNIX for Dummies Questions & Answers
Want to populate double quotes for each filed using awk:
Input: cat file.txt => "1-23-test_test1-test2"
Required output :
"1-23-test_test1-test2"|"#GT_properties_xyz"
Was trying the below command on solaris 9 machine :
awk -F"|" '{print $1"|""#GT_properties_xyz"}' file.txt
... (8 Replies)
Discussion started by: rajachandhok
8 Replies
5. Programming
I'm not very good at associative arrays; and working on this PHP code has got me a bit stumped. My goal is to populate a (multidimensional) associative array in a PHP while look after a MySQL query. The code fragment looks like this:
while($campaign_row = mysql_fetch_array($campaigninfo))
{
... (9 Replies)
Discussion started by: Neo
9 Replies
6. Shell Programming and Scripting
So, here's a scenario that requires the same logic as what I'm working on: Suppose that you have a directory containing files named after users. For awk's purposes, the filename is a single field-- something parse-friendly, like john_smith. Now, let's say that I'd like to populate an array in... (2 Replies)
Discussion started by: treesloth
2 Replies
7. Shell Programming and Scripting
Guys,
I need to iterate populate an array while going over files in directory. Can someone please tell me syntax I tried this but it isn't working ==>
for F in `ls -p "${directory1}" | grep -v "\/"`
do
cd "${directory2}"
cmp "${directory2}"/"${F}" "${directory1}"/"${F}" ... (2 Replies)
Discussion started by: Veenak15
2 Replies
8. Shell Programming and Scripting
Hi,
The following test case populate an array named: array3.
Since array1 and array2 are equal in length and values array3 will remain empty.
#!/usr/bin/ksh
test() {
set -A array1 "A"
set -A array2 "A"
NUM_1=`echo ${#array1}`
print "num elenemt in NUM_1 is ${NUM_1}"
i=1
for ELE2 in... (1 Reply)
Discussion started by: yoavbe
1 Replies
9. Shell Programming and Scripting
Hi.
I have a file with the following structer:
DB DISK LOCATION SIZE
============================================
PROD DATA_01 /dev/dm-23 10
PROD DATA_02 /dev/dm-24 10
PROD DATA_03 /dev/dm-25 10
DEV DATA_04 /dev/dm-26 10
DEV DATA_05 ... (1 Reply)
Discussion started by: yoavbe
1 Replies
10. Shell Programming and Scripting
Hi,
I'm looking for help trying to parse a data stream. Any help would be greatly appreciated.
My awk statement is
awk '/Aug/{a=$2}/vol/{print a, host, $1, $2, $3, $4, $5}' out.txt
Sample Data Stream "out.txt"
-----------------------------
# Aug 3 00:00:00 2008
===== DF =====... (3 Replies)
Discussion started by: jmd2004
3 Replies
XmbDrawText() XmbDrawText()
Name
XmbDrawText - draw internationalized multi-byte text using multiple font sets.
Synopsis
void XmbDrawText(display, drawable, gc, x, y, items, nitems)
Display *display;
Drawable drawable;
GC gc;
int x, y;
XmbTextItem *items;
int nitems;
Arguments
display Specifies the connection to the X server.
drawable Specifies the drawable.
gc Specifies the graphics context.
x, y Specifies the starting position and baseline of the text, relative to the origin of the specified drawable.
items Specifies an array of text items.
nitems Specifies the number of text items in the array.
Description
XmbDrawText() allows complex spacing and font set shifts between internationalized multi-byte text strings. Each text item is processed in
turn, with the origin of a text element advanced in the primary draw direction by the escapement of the previous text item. A text item
delta specifies an additional escapement of the text item drawing origin in the primary draw direction. A font_set member other than None
in an item causes the font set to be used for this and subsequent text items in the items list. Leading text items with font_set member
set to None will not be drawn.
XmbDrawText() does not perform any context-dependent rendering between text segments. Clients may compute the drawing metrics by passing
each text segment to XmbTextExtents() or XmbTextPerCharExtents(). When the XFontSet has missing charsets, each unavailable character is
drawn with the default string returned by XCreateFontSet(). The behavior for an invalid codepoint is undefined.
XmbDrawText() draws with fonts from the font sets of the items list rather than the font of the GC. For this reason, it may modify the
font value of the GC. Except for the font, it uses the same GC components as its pre-X11R5 analog XDrawText().
Structures
The XmbTextItem structure contains:
typedef struct {
char *chars; /* pointer to string */
int nchars; /* number of characters */
int delta; /* pixel delta between strings */
XFontSet font_set; /* fonts, None means don't change */
} XmbTextItem;
See Also
XDrawImageString(), XDrawString(), XDrawText(), XmbDrawImageString(), XmbDrawString(), XwcDrawText().
Xlib - Internationalized Text XmbDrawText()