Sponsored Content
Full Discussion: what is $@
Top Forums UNIX for Dummies Questions & Answers what is $@ Post 302235545 by era on Friday 12th of September 2008 06:18:13 AM
Old 09-12-2008
It expands to the command-line parameters passed to the script. However, it's wrong; it should be in double quotes, like "$@"

Code:
vnix$ cat >script
echo args: "$@"
for f in "$@"; do echo "arg: $f"; done
^D
vnix$ sh ./script foo bar baz
args: foo bar baz
arg: foo
arg: bar
arg: baz


Last edited by era; 09-12-2008 at 07:20 AM.. Reason: Add sample script
This User Gave Thanks to era For This Post:
 
AIRPORT2-PORTINSPECTOR(1)				      General Commands Manual					 AIRPORT2-PORTINSPECTOR(1)

NAME
airport2-portinspector - Port maps inspector for the Apple AirPort Extreme Base Station ("Snow") SYNOPSIS
airport2-portinspector DESCRIPTION
airport2-portinspector allows you to inspect the port maps used by the hosts associated with your base station. OPTIONS
airport2-portinspector accepts no command-line options. airport2-portinspector is a wrapper script around the PortInspector.jar jar file located in /usr/share/java/airport-utils. You can set the JAVACMD environment variable to use a specific JVM instead of the one chosen by the wrapper script. Set the DEBUG environ- ment variable to 1 to get the debug output from the wrapper script. ENVIRONMENT VARIABLES
DEBUG Set this variable to 1 to get the debug output from the wrapper script. JAVACMD The full path to the Java Virtual Machine to use. By default, the wrapper uses JAVACMD; if it is not set, it looks for JAVA_BINDIR/java, then for JAVA_HOME/bin/java before looking for a java executable in the PATH. In the latter case, the JVM used can be configured using the Debian alternatives system (see update-alternatives(8)). JAVA_HOME The full path where your JDK/JRE is installed. JAVA_BINDIR The full path to the directory where the java executable is located. JAVA_ARGS Extra command-line arguments to be passed to the Java Virtual Machine. AUTHOR
airport2-portinspector was written by Jon Sevy <jsevy@cs.drexel.edu>. This manual page was written by Julien BLACHE <jblache@debian.org>, for the Debian project (but may be used by others). May 20, 2006 AIRPORT2-PORTINSPECTOR(1)
All times are GMT -4. The time now is 06:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy