01-23-2013
No, i just want to populate a string using the path 1 and path 2 provided.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
I have tried to search for this, but keep getting a MySQL db connect error, so am posing the question here, and taking a risk of incurring the wrath of the mods with my first post...
I have the following test script:
#!/bin/bash
HTTPD=`/bin/ps -axcu | /usr/bin/grep httpd... (6 Replies)
Discussion started by: mikie
6 Replies
2. Shell Programming and Scripting
Hi,
I have an embedded Perl construct in a korn script. However, I cannot seem to access the shell variables that were declared outside this Perl section.
This is how my script is written....I have also tried back-ticks where I assign the shell variable to my local perl variable, still... (1 Reply)
Discussion started by: svetlur
1 Replies
3. Shell Programming and Scripting
Hi Guys,
could someone tell me what this ksh construct does
typeset -r PROG_PWD=${0%/*} does
I understand the -r for readonly but I would very much appreciate a definitive account of what this will set $PROG_PWD to.
If I run this at the cmd line it it gets set to /usr/bin but I would... (2 Replies)
Discussion started by: ajcannon
2 Replies
4. Shell Programming and Scripting
Hi all,
Sorry to ask this easy question but I am stuck. In a scenario i am executing one shell script which contains a if - else construct :
if ; then
echo $line
$line >> successful_build.txt
else
$line >> failed_services.txt
fi
explaination : if the... (5 Replies)
Discussion started by: bhaskar_m
5 Replies
5. Shell Programming and Scripting
Hi
can anyone tell me why is this code giving error
mode=$1
if ] || ] then
echo "MODES:"
exit 1
fi
Thanks (5 Replies)
Discussion started by: Anteus
5 Replies
6. Shell Programming and Scripting
I'd like to create a variable with the value of X number of space( no Perl please), printf seems to work, but , in following example,10 spaces becomes 1 space when assinged to a variable, Why? other solutions are welcome.
$printf "=%10s=\n"
= =
$var=$(printf "=%10s=\n")
echo... (4 Replies)
Discussion started by: honglus
4 Replies
7. Shell Programming and Scripting
Hi all
i have been trying to do a small 'question and answer' script using if-else statement and a combination of pipe. I have succeeded in allowing the user to login with user name and password stored in a sequence username/password in a file named "pass" like this:
echo "please enter your... (14 Replies)
Discussion started by: arikutex
14 Replies
8. UNIX for Dummies Questions & Answers
Please help me out: I've seen this construct
awk '{...}1'several times, like in scrutinizer's today's post
awk '{for(i=2;i<=NF;i++)if($i==$1)$i=RS $i}1' infilebut I can't find (manuals, man pages, internet FAQs,...) an explanation of what it does resp. stands for. Any hint is appreciated! (5 Replies)
Discussion started by: RudiC
5 Replies
9. Shell Programming and Scripting
Hi everybody!!
Here is the thing; I have a trouble in this simple situation, I'm trying to write an array with all the arguments of a command. I mean, if I have:
./mycommand.sh aa bb cc dd
I need to take an array like this:
myarray=(aa bb cc dd)
So I use a simple for loop like this:
for... (4 Replies)
Discussion started by: andresgom
4 Replies
10. Shell Programming and Scripting
Hi all,
I thought this would be simple, but I've been having a lot of trouble trying to write this IF statement, if I may ask for help pls:
In BASH, how would I construct the if statement:
Should ONLY be true if USEROPTscript=="yes"]] AND $mode=="INSTALL" /or/ $mode=="CHANGE" ]]... (3 Replies)
Discussion started by: jmccoughlin
3 Replies
LEARN ABOUT SUSE
gtk2::treepath
Gtk2::TreePath(3) User Contributed Perl Documentation Gtk2::TreePath(3)
NAME
Gtk2::TreePath
HIERARCHY
Glib::Boxed
+----Gtk2::TreePath
METHODS
treepath or undef = Gtk2::TreePath->new ($path=undef)
o $path (string)
Create a new path. For convenience, if you pass a value for $path, this is just an alias for "new_from_string".
treepath = Gtk2::TreePath->new_first
treepath or undef = Gtk2::TreePath->new_from_indices ($first_index, ...)
o $first_index (integer) a non-negative index value
o ... (list) of zero or more index values
The C API reference docs for this function say to mark the end of the list with a -1, but Perl doesn't need list terminators, so don't do
that.
This is specially implemented to be available for all gtk+ versions.
treepath or undef = Gtk2::TreePath->new_from_string ($path=undef)
o $path (string)
$path->append_index ($index_)
o $index_ (integer)
integer = $a->compare ($b)
o $b (Gtk2::TreePath)
Compares two paths. If $a appears before $b in the three, returns -1. If $b appears before $a, returns 1. If the nodes are equal,
returns 0.
integer = $path->get_depth
$path->down
Moves $path to point to the first child of the current path.
list = $path->get_indices
Returns a list of integers describing the current indices of $path.
boolean = $path->is_ancestor ($descendant)
o $descendant (Gtk2::TreePath)
boolean = $path->is_descendant ($ancestor)
o $ancestor (Gtk2::TreePath)
$path->next
Moves $path to point to the next node at the current depth.
$path->prepend_index ($index_)
o $index_ (integer)
boolean = $path->prev
Moves $path to point to the previous node at the current depth, if it exists. Returns true if there is a previous node and $path was
modified.
string = $path->to_string
boolean = $path->up
Moves $path to point to its parent node; returns false if there is no parent.
SEE ALSO
Gtk2, Glib::Boxed
COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
perl v5.12.1 2010-07-05 Gtk2::TreePath(3)