Sponsored Content
Full Discussion: $- parameter ...
Top Forums UNIX for Dummies Questions & Answers $- parameter ... Post 62047 by zazzybob on Thursday 10th of February 2005 06:06:28 PM
Old 02-10-2005
$- is used to show current shell options (in Bash, Korn and others)... These can be options passed during the shells invocation (i.e. when the shell is first started), or set whilst the shell is running with the "set" command. For example....

$ echo $-
himBH
$ set -x
$ echo $-
himxBH
$ set +x
$ echo $-
himBH
$ bash -r # start another shell with -r set
$ echo $-
himrBH
$ exit
$ echo $-
himBH

Read the manual page for the shell you're using and take a look at the "set" section and also the invocation options section.

I check the value of $- in my .kshrc file to make sure that it is executed for interactive shells only.

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parameter

I need to pass a filename parameter in shell script and then need to validate same name in the folder, Can any one help what would be piece of code to do so. Lets folder is a and file with a is test.dat and i want to pass this parameter against the file name file_name and then want to compare... (5 Replies)
Discussion started by: u263066
5 Replies

2. Shell Programming and Scripting

how do I make dynamic parameter names? Or get the value of a parameter evaluated twi

Say I write something like the following: var1=1 var2=2 for int in 1 2 do echo "\$var$int" done I want the output to be: 1 2 Instead I get something like: $var1 $var2 (2 Replies)
Discussion started by: Awanka
2 Replies

3. Shell Programming and Scripting

use $1 parameter

Hi, I have a script and I'm passing in a parmeter $1, and I only what to pass this $1 parmeter into another script. Please see below for details for help : virtual_gateway="$1" YYYYMMDD="`date +%Y%m%d`" ... (7 Replies)
Discussion started by: venhart
7 Replies

4. UNIX for Dummies Questions & Answers

how to get $1 parameter in ~/.bashrc

Hi, i am trying to convert windows path to linux and do some action on equivalent mounted one for the same in linux. echo '\\server1\source\path\needed_files' | sed -e 's!\\!/!g' | sed -e 's!^//!/!' | sed -e 's!\(/server1/source/path\)\(.*\)!/home/$USER/mount/server1\2!'output: ... (5 Replies)
Discussion started by: greet_sed
5 Replies

5. Shell Programming and Scripting

Command that takes one parameter and then searches for the passed in parameter

Hi I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/ Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies

6. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

7. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

8. Shell Programming and Scripting

Resolving a parameter which is passed as parameter

Hi, I have the following files. ->cat scr.sh export TMP_DIR=/home/user/folder1 export TMP_DIR_2=/home/user/folder2 while read line do cat "$line" done<file_list.dat ------------------------ -> cat file_list.dat $TMP_DIR/file1.txt $TMP_DIR_2/file2.txt --------------------------- -> cat... (6 Replies)
Discussion started by: barath
6 Replies

9. Shell Programming and Scripting

Call Script with Parameter (that has another parameter)

Hi. How do I achieve this sh /EDWH-DMT02/script/MISC/exec_sql.sh "@/EDWH-DMT02/script/others/CSM_CKC/Complete_List.sql ${file_name}" Complete_List.txt The /EDWH-DMT02/script/MISC/exec_sql.sh has two parameters and it's working fine with this sh /EDWH-DMT02/script/MISC/exec_sql.sh... (7 Replies)
Discussion started by: aimy
7 Replies

10. Shell Programming and Scripting

Use parameter expansion over a parameter expansion in bash.

Hello All, Could you please do help me here as I would like to perform parameter expansion in shell over a parameter expansion. Let's say I have following variable. path="/var/talend/nat/cdc" Now to get only nat I could do following. path1="${path%/*}" path1="${path1##*/}" Here... (8 Replies)
Discussion started by: RavinderSingh13
8 Replies
scmp_sys_resolver(1)					     libseccomp Documentation					      scmp_sys_resolver(1)

NAME
scmp_sys_resolver - Resolve system calls SYNOPSIS
scmp_sys_resolver [-h] [-a ARCH ] [-t] SYSCALL_NAME | SYSCALL_NUMBER DESCRIPTION
This command resolves both system call names and numbers with respect to the given architecture supplied in the optional ARCH argument. If the architecture is not supplied on the command line then the native architecture is used. If the "-t" argument is specified along with a system call name, then the system call will be translated as necessary for the given architecture. The "-t" argument has no effect if a system call number is specified. In some combinations of architecture and system call, a negative system call number will be displayed. A negative system call number indi- cates that the system call is not defined for the given architecture and is treated in a special manner by libseccomp depending on the operation. -a ARCH The architecture to use for resolving the system call. Valid ARCH values are "x86", "x86_64", "x32", and "arm". -t If neccessary, translate the system call name to the proper system call number, even if the system call name is different, e.g. socket(2) on x86. -h A simple one-line usage display. EXIT STATUS
Returns zero on success, errno values on failure. NOTES
The libseccomp project site, with more information and the source code repository, can be found at http://libseccomp.sf.net. This tool, as well as the libseccomp library, is currently under development, please report any bugs at the project site or directly to the author. AUTHOR
Paul Moore <paul@paul-moore.com> paul@paul-moore.com 23 May 2013 scmp_sys_resolver(1)
All times are GMT -4. The time now is 06:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy