08-09-2004
You can turn off globbing by using "set -f".
Turn it back on by using "set +f".
The hash bang pair "#!" are only significant if they are the first two characters in the script file.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks
Please let me know if anyone knows how to handle this.
My KSH script -> testscript.ksh
cmd=$1
ENV="devl"
echo $cmd
This is how I call the script
./testscript.ksh 'ps -ef | grep br$ENV'
How do I get this to print the below text i.e $ENV should be substituted with the value... (5 Replies)
Discussion started by: tipsy
5 Replies
2. AIX
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution is not... (2 Replies)
Discussion started by: arsheshadri
2 Replies
3. Solaris
Hi,
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution... (3 Replies)
Discussion started by: arsheshadri
3 Replies
4. Shell Programming and Scripting
Hi
I have a variable whose value is like this
i=/test/test1/test2/myfile.cd.070505123457
i would like to have the value of myfile.cd stored into another variable
my attempt is
test=${i##*/} ;echo $test ##and i get
myfile.cd.070505123457
since what i wnat is myfile.cd i try this... (19 Replies)
Discussion started by: xiamin
19 Replies
5. Shell Programming and Scripting
Hi
I have a variable BIT1 which holds some value. Is there a way to retrieve the value of this variable indirectly via another variable, lets say SUBSET_BIT_NUM=1, so the call will look something like this:
sundev1 $ echo ${BIT${SUBSET_BIT_NUM}}
ksh: ${BIT${SUBSET_BIT_NUM}}: bad substitution
... (3 Replies)
Discussion started by: aoussenko
3 Replies
6. Shell Programming and Scripting
hi,
i created a shell script having the following content:
#! /usr/bin/ksh
FROM="myemail@domain.com"
MAILTO="someemail@domain"
SUBJECT="TEST"
BODY="/export/home/adshocker/body.txt"
ATTACH="/export/home/adshocker/attach.prog"
echo $ATTACH
ATTACH_NAME="${ATTACH##*/}"
echo $ATTACH_NAME... (5 Replies)
Discussion started by: adshocker
5 Replies
7. Shell Programming and Scripting
Hello,
In bash I can use the following:
TMP=12345
MID=${TMP:1:1}
the expected result is: 2
but when using KSH I'm getting a ''bad substitution" error.
What is the correct syntaxin ksh?
Thanks (2 Replies)
Discussion started by: LiorAmitai
2 Replies
8. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script. I should replace in a very great file the character ";" with a space.
Example:
2750;~
2734;~
2778;~
2751;~
2751;~
2752;~
what the fastest method is? Sed? Awk?
Speed is dead main point, Seen the dimensions of the files
Thanks (6 Replies)
Discussion started by: GERMANICO
6 Replies
9. Shell Programming and Scripting
I'm trying to do an ls from inside of a ksh script. I loop through the results one line at a time and attempt to do a substitution using sed to convert YYYYMMDD from the older files into the newer files. Basically sometimes the ETL load runs over midnight and half the files are off by one day... (3 Replies)
Discussion started by: Calbrenar
3 Replies
10. Shell Programming and Scripting
Hi Gurus,
Not able to catch what's going wrong here. I just want to get output as "tree".
server:/mk/app/nexapp $ echo $SHELL
/usr/bin/ksh
server:/mk/app/nexapp $ export db_name1="tree"
server:/mk/app/nexapp $ export i=1
1st try:
server:/mk/app/nexapp $ echo $(db_name$i)
ksh: db_name1: ... (3 Replies)
Discussion started by: mukesh.lalwani
3 Replies
LEARN ABOUT NETBSD
veriexec
VERIEXEC(5) BSD File Formats Manual VERIEXEC(5)
NAME
veriexec -- format for the Veriexec signatures file
DESCRIPTION
Veriexec loads entries to the in-kernel database from a file describing files to be monitored and the type of monitoring. This file is often
referred to as the 'signatures database' or 'signatures file'.
The signatures file can be easily created using veriexecgen(8).
SIGNATURES DATABASE FORMAT
The signatures database has a line based structure, where each line has several fields separated by white-space (space, tabs, etc.) taking
the following form:
path type fingerprint flags
The description for each field is as follows:
path The full path to the file. White-space characters can be escaped if prefixed with a ''.
type Type of fingerprinting algorithm used for the file.
Requires kernel support for the specified algorithm. List of fingerprinting algorithms supported by the kernel can be obtained
by using the following command:
# sysctl kern.veriexec.algorithms
fingerprint The fingerprint for the file. Can (usually) be generated using the following command:
% cksum -a <algorithm> <file>
flags Optional listing of entry flags, separated by a comma. These may include:
direct Allow direct execution only.
Execution of a program is said to be ``direct'' when the program is invoked by the user (either in a script, manually
typing it, etc.) via the execve(2) syscall.
indirect Allow indirect execution only.
Execution of a program is said to be ``indirect'' if it is invoked by the kernel to interpret a script
(``hash-bang'').
file Allow opening the file only, via the open(2) syscall (no execution is allowed).
untrusted Indicate that the file is located on untrusted storage and its fingerprint evaluation status should not be cached,
but rather re-calculated each time it is accessed.
Fingerprints for untrusted files will always be evaluated on load.
To improve readaibility of the signatures file, the following aliases are provided:
program An alias for ``direct''.
interpreter An alias for ``indirect''
script An alias for both ``direct'' and ``file''.
library An alias for both ``file'' and ``indirect''.
If no flags are specified, ``direct'' is assumed.
Comments begin with a '#' character and span to the end of the line.
SEE ALSO
veriexec(4), security(7), veriexec(8), veriexecctl(8), veriexecgen(8)
HISTORY
veriexec first appeared in NetBSD 2.0.
AUTHORS
Brett Lymn <blymn@NetBSD.org>
Elad Efrat <elad@NetBSD.org>
BSD
March 18, 2011 BSD