02-10-2005
$- parameter ...
I have an excert from the Rute Tutorial and Expo by paul sheer... about parameters.. so far I have understood most of them .. except this one:
"$-
Expands to the current option flags as specified upon invocation, by the set builtin command, or those set by the shell itself (such as the -i option)." (by paul sheer Author of Rute Tutorial and Expo).....
when I excute this command on the command line I get this;
echo $-
himBH
if any could clarify this it would greatly be appreciated.. .
moxxx68
Last edited by moxxx68; 02-10-2005 at 06:19 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT CENTOS
seccomp_syscall_priority
seccomp_syscall_priority(3) libseccomp Documentation seccomp_syscall_priority(3)
NAME
seccomp_syscall_priority - Prioritize syscalls in the seccomp filter
SYNOPSIS
#include <seccomp.h>
typedef void * scmp_filter_ctx;
int SCMP_SYS(syscall_name);
int seccomp_syscall_priority(scmp_filter_ctx ctx,
int syscall, uint8_t priority);
Link with -lseccomp.
DESCRIPTION
The seccomp_syscall_priority() function provides a priority hint to the seccomp filter generator in libseccomp such that higher priority
syscalls are placed earlier in the seccomp filter code so that they incur less overhead at the expense of lower priority syscalls. A
syscall's priority can be set regardless of if any rules currently exist for that syscall; the library will remember the priority and it
will be assigned to the syscall if and when a rule for that syscall is created.
While it is possible to specify the syscall value directly using the standard __NR_syscall values, in order to ensure proper operation
across multiple architectures it is highly recommended to use the SCMP_SYS() macro instead. See the EXAMPLES section below.
The priority parameter takes an 8-bit value ranging from 0 - 255; a higher value represents a higher priority.
The filter context ctx is the value returned by the call to seccomp_init().
RETURN VALUE
The seccomp_syscall_priority() function returns zero on success, negative errno values on failure. The SCMP_SYS() macro returns a value
suitable for use as the syscall value in seccomp_syscall_priority().
EXAMPLES
#include <seccomp.h>
int main(int argc, char *argv[])
{
int rc = -1;
scmp_filter_ctx ctx;
ctx = seccomp_init(SCMP_ACT_KILL);
if (ctx == NULL)
goto out;
/* ... */
rc = seccomp_syscall_priority(ctx, SCMP_SYS(read), 200);
if (rc < 0)
goto out;
/* ... */
out:
seccomp_release(ctx);
return -rc;
}
NOTES
While the seccomp filter can be generated independent of the kernel, kernel support is required to load and enforce the seccomp filter gen-
erated by libseccomp.
The libseccomp project site, with more information and the source code repository, can be found at http://libseccomp.sf.net. This 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>
SEE ALSO
seccomp_rule_add(3), seccomp_rule_add_exact(3)
paul@paul-moore.com 25 July 2012 seccomp_syscall_priority(3)