08-24-2007
Quote:
Originally Posted by
smartbuddy
My Unix Version is Sun OS 5.8 and working in bash.
Thanks.
Did you try what i suggested above.That will work for you.
Thanks
Namish
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a variable A
echo $A
5060
I am exporting the value X,Y,Z and it id fetching right thing and When I run
C=`${X} -l ${Y} ${Z} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; netstat -na | grep \$A`"
here it is going to same directory and also running netstat -na | grep 5060
... (4 Replies)
Discussion started by: madhusmita
4 Replies
2. Shell Programming and Scripting
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)
Discussion started by: punitpa
4 Replies
3. Shell Programming and Scripting
I am sure it has been answered in some form or the other in this forum but trust me I have spent last couple of hours looking for an answer but can't find it.
I want to do a very simple operation within my script.
Let's say I have 4 files with the names file1.log, file2.log, file3.log and... (6 Replies)
Discussion started by: sssccc
6 Replies
4. Shell Programming and Scripting
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)
Discussion started by: gvinayagam
3 Replies
5. Shell Programming and Scripting
Hello Experts
I am newbie to unix and writing one script to make archive files
Problme i am facing is : I have used find command to find the type of files and I am storing find command results in a variable.
When I echo the variable I can see that path is printed properly but when i am... (5 Replies)
Discussion started by: mitsyjohn
5 Replies
6. Shell Programming and Scripting
Hi
How to use a variable to store the filename of a file which was found by the 'find' command.
can this be practical-->var = find . -name "filename.dat"
Please help.. (1 Reply)
Discussion started by: ayyappaas
1 Replies
7. Shell Programming and Scripting
Hello All
My req is to store the exit status of a command in shell variable
I want to check whether the file has header or not
The header will contain the string
DATA_ACQ_CYC_CNTL_ID
So I am running the command
head -1 $i | grep DATA_ACQ_CYC_CNTL_ID
Now I have to check if... (6 Replies)
Discussion started by: Pratik4891
6 Replies
8. Shell Programming and Scripting
I want to store the return value of
grep -c string filename
into a variable, say count. How do I do that?
For example if grep -c "string" "filename" shows 0 on executing it in the sh shell then I want to store this 0 in a variable. Is it possible? :D (5 Replies)
Discussion started by: navienavnav
5 Replies
9. Shell Programming and Scripting
Is it possible to store a command inside a variable?
i want this piece to be stored inside a variable, so i can use it later in a different command
$u | cut -d " " -f 2
var="$u | cut -d " " -f 2"
eval $var
I tried to use eval but I receive this error:
-f 2: command not found
... (5 Replies)
Discussion started by: velos
5 Replies
10. Programming
I am trying to store output of python command in variable. Could you please help how I can do that ?
For example I am executing the following command - "CentOS" in server_desc
The output would be True or False
I would like to store the output in a variable say outPut and use condition... (4 Replies)
Discussion started by: atanubanerji
4 Replies
LEARN ABOUT OSF1
ppmtopgm
ppmtopgm(1) General Commands Manual ppmtopgm(1)
NAME
ppmtopgm - convert a portable pixmap into a portable graymap
SYNOPSIS
ppmtopgm [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces a portable graymap as output. The output is a "black and white" rendering of the original
image, as in a black and white photograph. The quantization formula used is .299 r + .587 g + .114 b.
Note that although there is a pgmtoppm program, it is not necessary for simple conversions from pgm to ppm , because any ppm program can
read pgm (and pbm ) files automatically. pgmtoppm is for colorizing a pgm file. Also, see ppmtorgb3 for a different way of converting
color to gray. And ppmdist generates a grayscale image from a color image, but in a way that makes it easy to differentiate the original
colors, not necessarily a way that looks like a black and white photograph.
QUOTE
Cold-hearted orb that rules the night
Removes the colors from our sight
Red is gray, and yellow white
But we decide which is right
And which is a quantization error.
SEE ALSO
pgmtoppm(1),ppmtorgb3(1),rgb3toppm(1),ppmdist(1),ppm(5),pgm(5)
AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
10 April 2000 ppmtopgm(1)