08-18-2006
Dear Oliver,
I am not sure about your first problem as it's working fine on my machine as far as tour second problem is concern, you can try this code.
ls -ltr filename | awk '{
for (i=1;i<10;i++)
print(substr($1,i,1));
}'
regards
Apoorva kumar
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
Discussion started by: k@ssidy
9 Replies
2. UNIX for Dummies Questions & Answers
Okay, I've made threads on extracting fields and comparing strings in separate files in .csv's. I've written the following code with intentions of learning more.
I just want this one question answered: How can I assign fields from a file(comma separated) to variables?
My goal is to check... (0 Replies)
Discussion started by: chickeneaterguy
0 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have a file named log with 2 lines
Each line is a file name. eg
$ cat log
monday
tuesday
I need to read log and assign each output(filename) to a different variable.
The following doesn't work:-
while read A B
do
echo " a is ${A} "
echo " b is ${B} "
done <... (6 Replies)
Discussion started by: wisdom
6 Replies
4. Shell Programming and Scripting
I am looking to create a perl script which will take numbers from a simple text file, convert them from decimal to hex, and then rewrite those values in the file or create a new file with the hex numbers(whichever's easier).
My text document for example would be something as simple as
1312... (6 Replies)
Discussion started by: samh785
6 Replies
5. Shell Programming and Scripting
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.
I've the following values stored in the file.. It consists of only two rows..
10
20
I want to assign the first row value to variable "n1" and the second row value to variable "n2"..
That is ... (3 Replies)
Discussion started by: abk07
3 Replies
6. Shell Programming and Scripting
Hi,
I need to read two values,startdate and enddate from a param file and then write this value to another param file(global) under a specific workflow name.Here in global param file there is may workflow names, hence we need to check for the right one and then add the data below it.
Any... (5 Replies)
Discussion started by: angel12345
5 Replies
7. Shell Programming and Scripting
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Discussion started by: ccorder22
2 Replies
8. Shell Programming and Scripting
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Discussion started by: Arun Mishra
3 Replies
9. Shell Programming and Scripting
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
10. Shell Programming and Scripting
So first: Sorry if the title is confusing...
I have a script I'm writing with a file with several names in it (some other info - but it's not really pertinent...) - I want to be allow the user to delete certain records, but I ran into a problem I'm not sure how to go about fixing.
If I were... (6 Replies)
Discussion started by: sabster
6 Replies
LEARN ABOUT SUSE
pango::context
Pango::Context(3) User Contributed Perl Documentation Pango::Context(3)
NAME
Pango::Context
HIERARCHY
Glib::Object
+----Pango::Context
METHODS
direction = $context->get_base_dir
$context->set_base_dir ($direction)
o $direction (Pango::Direction)
gravity = $context->get_base_gravity
Since: pango 1.16
$context->set_base_gravity ($gravity)
o $gravity (Pango::Gravity)
Since: pango 1.16
fontdescription = $context->get_font_description
$context->set_font_description ($desc)
o $desc (Pango::FontDescription)
fontmap = $context->get_font_map
Since: pango 1.6
gravity = $context->get_gravity
Since: pango 1.16
gravityhint = $context->get_gravity_hint
Since: pango 1.16
$context->set_gravity_hint ($hint)
o $hint (Pango::GravityHint)
Since: pango 1.16
language = $context->get_language
$context->set_language ($language)
o $language (Pango::Language)
@families = $context->list_families
font = $context->load_font ($desc)
o $desc (Pango::FontDescription or undef)
fontset = $context->load_fontset ($desc, $language)
o $desc (Pango::FontDescription)
o $language (Pango::Language or undef)
matrix or undef = $context->get_matrix
Since: pango 1.6
$context->set_matrix ($matrix)
o $matrix (Pango::Matrix or undef)
Since: pango 1.6
fontmetrics = $context->get_metrics ($desc, $language)
o $desc (Pango::FontDescription)
o $language (Pango::Language or undef)
ENUMS AND FLAGS
enum Pango::Direction
o 'ltr' / 'PANGO_DIRECTION_LTR'
o 'rtl' / 'PANGO_DIRECTION_RTL'
o 'ttb-ltr' / 'PANGO_DIRECTION_TTB_LTR'
o 'ttb-rtl' / 'PANGO_DIRECTION_TTB_RTL'
o 'weak-ltr' / 'PANGO_DIRECTION_WEAK_LTR'
o 'weak-rtl' / 'PANGO_DIRECTION_WEAK_RTL'
o 'neutral' / 'PANGO_DIRECTION_NEUTRAL'
enum Pango::Gravity
o 'south' / 'PANGO_GRAVITY_SOUTH'
o 'east' / 'PANGO_GRAVITY_EAST'
o 'north' / 'PANGO_GRAVITY_NORTH'
o 'west' / 'PANGO_GRAVITY_WEST'
o 'auto' / 'PANGO_GRAVITY_AUTO'
enum Pango::GravityHint
o 'natural' / 'PANGO_GRAVITY_HINT_NATURAL'
o 'strong' / 'PANGO_GRAVITY_HINT_STRONG'
o 'line' / 'PANGO_GRAVITY_HINT_LINE'
SEE ALSO
Pango, Glib::Object
COPYRIGHT
Copyright (C) 2003-2009 by the gtk2-perl team.
This software is licensed under the LGPL. See Pango for a full notice.
perl v5.12.1 2010-07-05 Pango::Context(3)