I am tasked to modify soem script and I come accross a line which I dont fully understand. I tried searching online but I couldnt get a good explanation on it.
Here it the part of the code:
What is the colon (:) and hypen (-) means on the if statement? I never used this on any of my if statement before.
I want to do this:
Ex 1:
case $answer in
1|2|3|4|5) echo $answer;;
x) break;;
*) echo "Invalid selection. Try again.";;
esac
But I need the part "1|2|3|4|5" to be fetched from a variable, like so:
Ex 2:
case $answer in
$cases) echo $answer;;
x) break;;
*) echo "Invalid... (2 Replies)
Can someone help me out here. I can't get this piece of code to work. i.e. $ALL_EVENTS does not get interpreted in the if brackets. The first part is the code, the second part is the execution of the code. Note: $ALL_EVENTS does equal 2, but there is no value once passed to the if statement. ... (4 Replies)
I have a script where I take input from user and see if it falls in list of valid entry.
---------------
#!/bin/ksh
VALID_ENTRIES="4|5|6"
echo "enter your choice"
read reply
IFS="|"
echo "valid entries are $VALID_ENTRIES"
case "$REPLY" in
Q|q ) IFS="$IFS_SAVE";return ;;... (5 Replies)
So I have a if statement inside an awk to check if $2 of a awk equals a specific IP but the test fails. So here is what I have.
# !/bin/sh
echo "Enter client ID"
read ID
echo "Enter month (01, 02, 03)"
read month
echo "Enter day (03, 15)"
read day
echo "Enter Year (07, 08)"
read... (6 Replies)
Hi,
The following command runs on in the Korn shell prompt. however i want to output the value of this to a variable. Can anyone provide a solution?
echo 'ABC,DEF,"G,HI,J",KLM,"MNi,O"'| awk -F "\"" '{for(i=1;i<=NF;i++){if(i%2)gsub("\,","~^~",$i)}}1' (2 Replies)
i want to select a variable created and use it in a if statement, but not getting the desired results
LINE='device for 0101a01: lpd://172.25.41.111:515'
prt=`echo $LINE | awk '{print $3 }' | cut -c 1-7`
echo $prt
My if statement to select just what i want..
IFS=$":"
while read prt... (11 Replies)
Hello,
Can anyone tell me that,
How can I assign variable to shell script variable, which i need to use in INSERT INTO statement?
my shell script variables are,
EMPNAME=`regular expression`
EMPID=`regular expression`
EMPBDATE=`regular expression`
Now through ksh script I am... (16 Replies)
Hi,
I would like to set a variable using ls, but I need to be able to list two possibilities simultaneously, i.e., I'd like to do this all on one line. These are the two possible directories, but keep in mind only *one* will be present at any given time:
drwxrwxrwx 4 qtv qtv 16384 Nov 9... (5 Replies)
I have another question I am stuck at :wall:
I have a text file with two columns, like so...
2 0.0627279
3 0.0794451
4 0.108705
5 0.137739
6 0.190394
7 0.217407
8 0.241764
9 0.344458
10 0.460762
I'd like to go through the file line by line until the value in the second column... (3 Replies)
I have multiple requirements to run data extracts (with the same basic requriement / resulsts) however the parameters of the extracts change with each request. To help make life easier I am writing a script where the parameters for the specific request are set at the start and then used as needed.... (6 Replies)
Discussion started by: meike
6 Replies
LEARN ABOUT DEBIAN
ppi::statement::end
PPI::Statement::End(3pm) User Contributed Perl Documentation PPI::Statement::End(3pm)NAME
PPI::Statement::End - Content after the __END__ of a module
SYNOPSIS
# This is normal content
__END__
This is part of an PPI::Statement::End statement
=pod
This is not part of the ::End statement, it's POD
=cut
This is another PPI::Statement::End statement
INHERITANCE
PPI::Statement::End
isa PPI::Statement
isa PPI::Node
isa PPI::Element
DESCRIPTION
"PPI::Statement::End" is a utility class designed to serve as a contained for all of the content after the __END__ tag in a file.
It doesn't cover the ENTIRE of the __END__ section, and can be interspersed with PPI::Token::Pod tokens.
METHODS
"PPI::Statement::End" has no additional methods beyond the default ones provided by PPI::Statement, PPI::Node and PPI::Element.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.1 2011-02-26 PPI::Statement::End(3pm)