.
.
.
When i just remove the function and the local before the variable names the same script STRANGELY works fine. Can you tell me what's wrong i m doing by creating a function ?
Why STRANGELY? It performs exactly as specified and expected. man bash:
Quote:
When a function is executed, the arguments to the function become the positional parameters during its execution.
As a system administrator. sometimes we see the users are trying some commands dangerous for the system health and remove them from their individual coomand history file.
How it is possible to enforce that the normal usres will will not be able to modify the history.
Thanks in advance.
Partha (4 Replies)
I need to create a shell script having the menu with few options such as
1. Listing 2. Change permissions 3. Modify Contents 4. Delete Files 5. Exit
1. For 1. Listing: Display a special listing of files showing their date of modification and access time (side by side) along with their... (2 Replies)
Hi,
I need to implement something that will enforce login to a Solaris server as a particular, specifed user. After this login stage, users will be able to "su -" to whichever user they wish, by which time their activity will be captured by some sort of script (yet to be written). What I need... (7 Replies)
Hi All,
How to enforce all users to change their password when they try to login.
I am having Solaris 9 and 10.
Even it would be much better if anyone can say to enforce all users to change their password next morning they login.
Thanks in advance,
Deepak (3 Replies)
Hi, I'm having problems with a script where I wanted every single option specified in the command line to have an argument taken with it, but for some reason only d works in the code I will be showing below.
For example if I did ./thisfile -a something
it would come up with "a chosen with " as... (2 Replies)
Hello All,
I have shell script as below in a.ksh.
#! /usr/bin/ksh
while getopts a: b: ab:f: VAR
do
case $VAR in
a) A=${OPTARG}
echo $A;;
b) B=${OPTARG}
echo $B;;
ab) AB=${OPTARG}
echo $AB ;;
f) F=${OPTARG}
echo $F ;;
esac
done
When I execute sh a.ksh -a 1 -b 2 -ab 3 -f 4 as below... (7 Replies)
i have the following scenario want to run the following script with manadory and optional argumnets
Manadory options are :
filename=""
port=""
optional arguments
type -t
balances -b bal
prices -p
./test filename port -t A -b bal
my code i have that won't parse the options is... (1 Reply)
How can I say one of the options is required? can I use an if statement?
let say:
while getopts ":c:u:fp" opt; do
case $opt in
c) echo "-c was triggered, Parameter: $OPTARG" >&2;;
u) echo "-u was triggered, Parameter: $OPTARG" >&2;;
f) echo "-u was triggered,... (2 Replies)
I'm using getopts to process command line args in a Bash script. The code looks like this:
while getopts ":cfmvhs:t:" option; do
case $option in
c) operationMode="CHECK"
;;
f) operationMode="FAST"
;;
m) ... (6 Replies)
i am reading line by line from a file as below
while IFS= read -r var
do
...
...
...
done < "hello.txt"
I added the keytool command in the do while loop as below.
while IFS= read -r var
do
...
keytool -genkey -alias $fname -keyalg RSA -keystore $fname.jks -keysize 2048
...
done... (3 Replies)
Discussion started by: mohtashims
3 Replies
LEARN ABOUT MINIX
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)