02-18-2011
oh, my fault--I see whatchu mean now. I overlooked that...I was wondering why you posted that; just a minor oversight on my part. The way you explained it previously was kinda ambiguous.
Thanks for your inputs anyway!
Have a good one!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi everyone,
I am trying to set up the .profile for a user I have just created. In trying to set up the shell variables, I want to make the shell be korn shell (default shell i believe is Borne shell), so, this is what I did:
SHELL=/usr/bin/ksh
export SHELL
Whenl executing the .profile,... (1 Reply)
Discussion started by: rachael
1 Replies
2. Shell Programming and Scripting
If I set a variable within a while-read loop, sometimes it's local to the loop, sometimes it's global, depending on how the loop is set up. I'm testing this on a Debian Lenny system using both bash and dash with the same results.
For example:
# Pipe command into while-read loop
count=
ls -1... (2 Replies)
Discussion started by: mjd_tech
2 Replies
3. UNIX for Dummies Questions & Answers
Hi All
How can i control for loop with two different variables in csh shell
Regards
Nikhil (1 Reply)
Discussion started by: Nikhilindurkar
1 Replies
4. UNIX for Dummies Questions & Answers
I nedd help on the below highlited one.
can any one explain on this,How its work in shell scripting.. then that will be very great full...
L_ABCD=${L_DBG:=N}
Thanks
Muddasas (3 Replies)
Discussion started by: muddasani
3 Replies
5. Shell Programming and Scripting
Hi,
does anybody knows how to manage, that the filenames are assigned to a variable in a loop afer getting them with set command in a ksh, like:
set B*.txt
i=1
c=$#
x=$((c+1))
echo "$x"
while ] ; do
_ftpfile$i="$"$i
echo "$_ftpfile$i"
i=$((i+1))
done
The first echo returns,... (2 Replies)
Discussion started by: spidermike
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have two files File1 & File2.
File1
76 135
136 200
250 345
....
File2
1 24
1 35
1 36
1 72
....
I want to get all the values form File2 corresponding to the range in File 1 and feed it to a program. Is the code below right? Can I pass shell variables to awk in this... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
7. Shell Programming and Scripting
Hi,
I am having a bit of trouble with the below code:
file=/path/to/file
for i in 03 06 07 21; do
if ; then
eval count$i=`grep -c word $file-$i`
fi
done
Totalcount=0
for i in 03 06 07 21; do
if ; then
echo $count$i variable not exist;
else Tcount=`expr $Tcount + $count$i`;
fi... (3 Replies)
Discussion started by: brunlea
3 Replies
8. Shell Programming and Scripting
Well,
this command has served me quite well under DOS
for %%X in (*.txt) do COMMAND
however in linux it just outputs:
"./install.sh line 1: '%%x': not a valid identifier.
Ideas ?
Thanks in advance (2 Replies)
Discussion started by: pasc
2 Replies
9. Shell Programming and Scripting
Hello All.
Good Afternoon.
I need one small help regarding setting of env variables for a particular host by getting it from the DB.
For ex :
1. I am using LOCALHOST.
2. When I run a ./hostset.sh it should pick up the Oracle home details from associated DB and set it.
Please... (1 Reply)
Discussion started by: PavanPatil
1 Replies
10. Shell Programming and Scripting
Hi guys!
Kind of new to bash scripting and now I'm stuck.
I need to curl with these variables:
"{ \"nodename\": \"$1\", \"ipaddress\": \"$2\", \"poolname\": \"$3\", \"port\": \"$4\", \"loadbalancer\" : \"$5\" }"
and my input_file.txt contains
server001 10.10.10.01 serverpool1 80... (4 Replies)
Discussion started by: yort
4 Replies
LEARN ABOUT MOJAVE
autopush
autopush(1M) System Administration Commands autopush(1M)
NAME
autopush - configures lists of automatically pushed STREAMS modules
SYNOPSIS
autopush -f filename
autopush -g -M major -m minor
autopush -r -M major -m minor
DESCRIPTION
The autopush command configures the list of modules to be automatically pushed onto the stream when a device is opened. It can also be used
to remove a previous setting or get information on a setting.
OPTIONS
The following options are supported:
-f filename Sets up the autopush configuration for each driver according to the information stored in filename. An autopush file con-
sists of lines of four or more fields, separated by spaces as shown below:
major minor last-minor module1 module2 ... module8
The first field is a string that specifies the major device name, as listed in the /kernel/drv directory. The next two
fields are integers that specify the minor device number and last-minor device number. The fields following represent the
names of modules. If minor is -1, then all minor devices of a major driver specified by major are configured, and the value
for last-minor is ignored. If last-minor is 0, then only a single minor device is configured. To configure a range of minor
devices for a particular major, minor must be less than last-minor.
The remaining fields list the names of modules to be automatically pushed onto the stream when opened, along with the posi-
tion of an optional anchor. The maximum number of modules that can be pushed is eight. The modules are pushed in the order
they are specified. The optional special character sequence [anchor] indicates that a STREAMS anchor should be placed on
the stream at the module previously specified in the list; it is an error to specify more than one anchor or to have an
anchor first in the list.
A nonzero exit status indicates that one or more of the lines in the specified file failed to complete successfully.
-g Gets the current configuration setting of a particular major and minor device number specified with the -M and -m options
respectively and displays the autopush modules associated with it. It will also return the starting minor device number if
the request corresponds to a setting of a range (as described with the -f option).
-m minor Specifies the minor device number.
-M major Specifies the major device number.
-r Removes the previous configuration setting of the particular major and minor device number specified with the -M and -m
options respectively. If the values of major and minor correspond to a previously established setting of a range of minor
devices, where minor matches the first minor device number in the range, the configuration would be removed for the entire
range.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
non-zero An error occurred.
EXAMPLES
Example 1: Using the autopush command.
The following example gets the current configuration settings for the major and minor device numbers as indicated and displays the autopush
modules associated with them for the character-special device /dev/term/a:
example# autopush -g -M 29 -m 0
Major Minor Lastminor Modules
29 0 1 ldterm ttcompat
FILES
/etc/iu.ap
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
bdconfig(1M), ttymon(1M), attributes(5), ldterm(7M), sad(7D), streamio(7I), ttcompat(7M)
STREAMS Programming Guide
SunOS 5.10 26 Mar 1999 autopush(1M)