05-30-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to check two variables and if both are blank I want to set a flag:
the_f3_pid=`rsh $target ps -ef | grep "f3.eab" | awk '{print $2}'`
the_f7_pid=`rsh $target ps -ef | grep "f7.eab" | awk '{print $2}'`
if ; then
y=1
fi
I get an error:
./script_name: test: 0403-021 ]... (4 Replies)
Discussion started by: rcarnesiii
4 Replies
2. HP-UX
hi,
i was trying to club to test condition with if.
if -o ; then
it is giving me error message, i wanted to ask how can we check two condtions with one if. (1 Reply)
Discussion started by: babom
1 Replies
3. Shell Programming and Scripting
When reading over some perl code in a software document, I came across an assignment statement like this
$PATH = ${PROJECT}/......./....
In this particular form of scalar variable assignment, what does the curly braces operators do ? Also, what is the benefit in doing scalar assignment this... (3 Replies)
Discussion started by: JamesGoh
3 Replies
4. Shell Programming and Scripting
Hi,
I'm new to UNIX, at least shell programming and am having trouble figuring out a problem i'm having. In one section in my nested if statement, i want the program to test if the file does not exist, based on an argument supplied at the command line by the user. What i have is
elif ; then... (3 Replies)
Discussion started by: rowlf
3 Replies
5. Shell Programming and Scripting
I have a string of commands I am piping some data through and I want to allow command line switches to select which commands are used. I want to do something like this: OPTION="| command3"
command1 -a -b c.txt | command2 -d -e $OPTION >result.txt
I want to do it that way because OPTION may be... (1 Reply)
Discussion started by: KenJackson
1 Replies
6. UNIX for Dummies Questions & Answers
All,
THe below is my script , when i use this i am getting nothing . could any one help me to know what is the use of the << operator below
su - $8 << supo
echo "exportsph $2 $1 $3 $4"
exportsph $2 $1 $3 $4
supo
i also tried as individual command su - userid << supo , when i do... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
7. Shell Programming and Scripting
Hey ,
I'm trying to perform the following command, however it cannot read the variable assigned earlier. I'm not sure why this happen. Please help thanks
while :
do
echo "what's ur name? (if none just press )"
read name
changeName = echo $name | sed "s/on/ey/"
echo $changeName #this... (8 Replies)
Discussion started by: sexyTrojan
8 Replies
8. UNIX for Dummies Questions & Answers
im new to bash scripting and im just using online tutorials and trial and error. i wanted to write a script to read numbers from a file and find their sum:
#!/bin/bash
theSum=0
for line in $(cat numbers.txt)
do
let "theSum = theSum + $line"
echo "$line"
done
echo "The sum is... (3 Replies)
Discussion started by: astrolux444
3 Replies
9. Shell Programming and Scripting
I wanted to write a bash script which take a variable X with math operator as (* or / or + or - or % and more ....). Instead of writing logic for each condition can we have a generic logic. Like sudo code below.
A=10, B=20
P = $A $X $B;
echo $P;
-------------
when X has value "*" echo $P,... (1 Reply)
Discussion started by: samcompda
1 Replies
10. Shell Programming and Scripting
I have a little code block (executing on AIX 7.1) that I cannot understand why the NOTFREE=0 does not appear to be assigned even though it goes through that block. This causes a unary operator issue.
#!/bin/bash
PLATFORM="AIX"
NEEDSPC=3000
set -x
if ; then
lsvg | grep -v rootvg | while... (6 Replies)
Discussion started by: port43
6 Replies
LEARN ABOUT DEBIAN
arch::liteweb
Arch::LiteWeb(3pm) User Contributed Perl Documentation Arch::LiteWeb(3pm)
NAME
Arch::LiteWeb - simple way to access web pages
SYNOPSIS
my $web = Arch::LiteWeb->new;
my $content = $web->get("http://some.domain:81/some/path");
die $web->error . " while processing " . $web->request_url
unless $content;
my $content_type = $web->response_headers->{content_type};
DESCRIPTION
This class provides a basic and easy to use support for the client-side HTTP. It is supplied in order to avoid dependency on LWP. If such
dependency is not a problem, consider to use LWP instead that provides much better support for HTTP and other protocols.
METHODS
The following class methods are available:
get, post, request_url, error, error_with_url, network_error, response_code, response_codestr, response_error, response_headers,
response_content.
get url [params ...]
Execute HTTP get of the given url and return the html string or undef on network/response error. Use other methods to get the details
about the error and the response.
params is key-value hash, the following keys are supported:
url_host - only used if url is none
url_port - only used if url is none(80)
url_path - only used if url is none
endl - default is "