Found this piece of code written in ksh. I have no ideas what do the stuff like ${SRF##*\.} do.
SUFFIX=${SRF##*\.}
if ; then
SUFFIX=""
fi
I have encountered similar expressions in other programs also. Any pointers on where to learn more about these... (1 Reply)
Discussion started by: jyotipg
1 Replies
2. Post Here to Contact Site Administrators and Moderators
woofie,
Your posts are being deleted because your use of profanity.
I am close to changing your status to read only.
In fact, if you argue with the mods again, I will ban you from these boards.
Neo (1 Reply)
Looking at the member list, there are alot of interesting names, some unique, some bizarre, and some that are just plain. How did you come by your name? Why did you choose your label?
Me? Well, I wish I could change mine. I chose Google because thats how I stumbled upon this site. I wasn't sure... (66 Replies)
#! /bin/bash
head -5 $1
echo "remove $1 ?"
read answer
if
then
echo invalid answer
elif
rm $1
echo "$1 is deleted"
elif
then
echo file is not deleted
else
echo "invalid answer"
fi
What i really want this to do is to ask to delete the file or not..it says something wrong... (1 Reply)
#! /bin/bash
USAGE=" | ]
if
then
echo "$USAGE"
exit 1
fi
while getopts lb: OPTION
do
case $(OPTION)in
a) echo Hi there!
exit 2;;
b) echo hello
o) OARG=$OPTARG;;
\?)echo "$USAGE" ;;
exit 2;;
esac
done
shift `expr... (1 Reply)
hi all,
i found NAME=${0##*/} in a script.
i given this coomand in my unix box(presently in ksh).
echo ${0##*/} it returned ksh.
the purpose of the above is to return the shell name or more than that.
do you have any more information like this, please share with me.
one more query... (7 Replies)
can anyone tell me why this code doesn't work how its supposed to, its the hangman game but it doesn't play how its supposed to
#!/bin/bash
NoAttempts="0"
livesgiven="5"
LivesRemain=$livesgiven
LettersAttempted=""
wordfile=words
numwords=0
function menu()
{
clear
cat << menu... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
ls -ld htdocs
drwxr-x--- 3 root root 8192 2006-11-19 10:41 htdocs
How would a host administrator... (1 Reply)
Discussion started by: Larry_1
1 Replies
LEARN ABOUT DEBIAN
augparse
AUGPARSE(1) Augeas AUGPARSE(1)NAME
augparse - execute an Augeas module
SYNOPSIS
augparse [OPTIONS] MODULE
DESCRIPTION
Execute an Augeas module, most commonly to evaluate the tests it contains.
OPTIONS -I DIR
Add DIR to the module loadpath. Can be given multiple times. The directories set here are searched before any directories specified in
the AUGEAS_LENS_LIB environment variable, and before the default directory /usr/share/augeas/lenses.
--nostdinc
Do not search any of the default directories for modules. When this option is set, only directories specified explicitly with -I or
specified in AUGEAS_LENS_LIB will be searched for modules.
--notypecheck
Do not perform lens type checks. Only use this option during lens development and make sure you typecheck lenses when you are done
developing - you should never use a lens that hasn't been typechecked. This option is sometimes useful when you are working on unit
tests for a lens to speed up the time it takes to repeatedly run and fix tests.
--version
Print version information and exit.
-h Display this help and exit
EXAMPLES
To run the tests in lenses/tests/test_foo.aug and use modules from the directory lenses, run
augparse -I lenses lenses/tests/test_foo.aug
TESTS
Tests can appear as top-level forms anywhere in a module. Generally, the tests for a module lenses/foo.aug are kept in a separate file,
usually in lenses/tests/test_foo.aug.
There are two different kinds of tests that Augeas can run: get and put tests. The syntax for get tests is
test LENS get STRING = RESULT
which applies the get direction of the lens LENS to STRING and compares it with the given RESULT. RESULT can either be a tree literal, the
symbol ? to print the result of applying LENS to STRING, or the symbol * to indicate that the test should produce an exception.
The syntax for put tests is
test LENS put STRING after COMMANDS = RESULT
which first applies the get direction of the lens LENS to STRING, then applies the given COMMANDS to the resulting tree, and finally
transforms the modified tree back to a string using the put direction of LENS. The resulting string is then compared to RESULT, which can
be a string, the symbol ? to print the result of applying LENS to STRING, or the symbol * to indicate that the test should produce an
exception.
SEE ALSO
Augeas project homepage <http://www.augeas.net/>
augtool
Augeas 0.9.0 2011-11-29 AUGPARSE(1)