Try this:
Don't quote the "True". By quoting the "True" you were comparing a Boolean with a string. But the truth is you don't even need that:
Or even:
As for this:
Python is case-sensitive. "centos" is not "CentOS". If you want a case-insensitive string comparison, try:
There may be other ways.
Hi,
How do I store following command output:
export RESULT=`date` &
It works when I do :
export RESULT=`date`
But what I need is when command put it background, I also need that output going to RESULT variable.
Is there any way ?
Thanks
Sanjay (1 Reply)
Hi,
I am getting the following error while executing the script. Please can someone throw some light where is the problem. Many thanks.
./check: temp: not found
The directory related to SEP instance 4 does not exist.
The script is as follows.
SEP_APP="/scp/sepx/app... (2 Replies)
Hi,
My requirement is :
We are calling an sql statement from a UNIX session, and fetching data into some variables from a table .. now we are unable to access these variables from outside the SQL part. Please let me know how can I achieve this.
Can you please share a code snippet which... (4 Replies)
Example output:
/tmp/generatelines.sh
line1
line2
line3
line4
I want each output line assigned to its own variable, ie:
"line1" --> $a
"line2" --> $b
"line3" --> $c
"line4" --> $d
Is this possible without writing to a temporary file?
Thanks (4 Replies)
I intend to find the path/full location of a file(filename given by user thru "read filenme") using "find" or any other command and then store it's output in a variable for some other processing.
But struggling to put all things together (i.e finding the fully qualified location of that file and... (4 Replies)
Hello guys
I need to run a script to remove the last column of different comma separated files.
The problem is that the number of columns of my files will be different and I won't know that number every time i run my script.
Is there any command I can use to remove the last column without... (7 Replies)
When I run following command
date
Output1 => Thu Sep 9 03:26:52 IST 2010
When I store in a varibale as
a=`date`
echo $a
output2 => Thu Sep 9 03:27:02 IST 2010
The differnece is, it is trimming the space when I am storing the output in varibale.
Output1 = Thu Sep 9 03:26:52 IST 2010... (2 Replies)
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
I need some help:
1) I have a out put from a shell script, the out put looks like this:
Attempting privilege escalation using sudo ...
List backups for CLTST:
Start date Status Ret. Class Label
-------------------- ------------ ------------ ... (2 Replies)
Discussion started by: samk
2 Replies
LEARN ABOUT DEBIAN
empy
EMPY(1) General Commands Manual EMPY(1)NAME
empy - A powerful and robust templating system for Python
SYNOPSIS
empy [options] [<filename, or '-' for stdin> [<argument>]]
DESCRIPTION
This manual page documents briefly the empy command.
EmPy is a system for embedding Python expressions and statements in template text; it takes an EmPy source file, processes it, and produces
output. This is accomplished via expansions, which are special signals to the EmPy system and are set off by a special prefix (by default
the at sign, @).
EmPy can expand arbitrary Python expressions and statements in this way, as well as a variety of special forms. Textual data not explicitly
delimited in this way is sent unaffected to the output, allowing Python to be used in effect as a markup language. Also supported are call-
backs via hooks, recording and playback via diversions, and dynamic, chainable filters. The system is highly configurable via command line
options and embedded commands.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below. For a complete description, see the Info files.
-h, --help
Show summary of options.
-v, --version
Show version of program.
SEE ALSO python(1).
AUTHOR
EmPy was written by Erik Max Francis <software@alcyone.com>.
This manual page was written by Ana Beatriz Guerrero Lopez, for the Debian project (but may be used by others).
EMPY(1)