I have a question about expanding shell variables. Given the following piece of script:
a="Some text"
b="Other text"
for i in a b
do
string1=$i
echo $string1 --> returns 'a'
string2=EXPRESSION_WITH_$i
echo $string2 --> returns 'Some text'
done
... (2 Replies)
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Hi !
I am making my first steps to make a script. Therefore i try to make a scp command more easier. Given is the following alias:
14='admin@x-abcd-def.xyz
Now i want to let the script read three var's from the console to use them in the script and then build the scp string.
echo... (7 Replies)
I'm having a little trouble with a Solaris package build/install.
I have the following entries in my prototype file...
# Interfaces file - all versions installed and auto linked to installation type...
f none $OPTDIR/config/interfaces.DEV 0444 $OWNER $GROUP
f none... (0 Replies)
I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash".
sed -e 's/<HOME_DIRECTORY>/'$HOME'/'This gives me the following error:
sed: -e expression #1, char 21: unknown option to `s'Obviously this is... (2 Replies)
our sparc server has only 1Gb RAM. Since RAM is not very expensive anymore, it seems like a good idea to upgrade it.
will it make server (and database on it) faster?
I hope it would less 'abuse' hard drive.. (6 Replies)
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
s=`awk '{ print $0}' /Applications/Relink.app/z_cloudline.txt`
sed -n '"$s"' /var/mobile/Library/iFile/Bookmarks.plist > /var/mobile/originalip.txt
What is the problem with that code ?
With variable it only outputs:
sed: -e expression #1, char 1: unknown command: `"'
If I use the... (3 Replies)
Heyas
I'm trying to give some information on used variables.
While the first two work fine, the ones starting with a glob (is that the proper term?) fail.
echo ${!TUI_*} ${!RET_*} ${!*_CLI} ${!*\_GUI}
bash: ${!*_CLI}: bad substitution
Same with @ or have them escaped.
I found no... (2 Replies)
Discussion started by: sea
2 Replies
LEARN ABOUT DEBIAN
lighty-enable-mod
LIGHTYENABLEMOD(1) General Commands Manual LIGHTYENABLEMOD(1)NAME
lighty-enable-mod, lighty-disable-mod - enable or disable configuration in lighttpd server
SYNOPSIS
lighty-enable-mod [module]
lighty-disable-mod [module]
DESCRIPTION
This manual page documents briefly the lighty-enable-mod and lighty-disable-mod commands.
lighty-enable-mod and lighty-disable-mod are programs that enable (and respectively disable) the specified configuration file within
lighttpd configuration.
Both programs can be run interactively or from command line. If either program is called without any arguments, an input prompt is dis-
played to the user, where he might choose among available lighttpd modules. Immediate action is taken, if a module name was given on the
command line.
EXIT STATUS
Both programs indicate failure in their exit status. lighty-enable-mod or lighty-disable-mod respectively may leave execution with one of
the following exit codes:
0 denotes success
1 denotes a fatal error (e.g., a module could not be enabled, or a dependency was not found)
2 denotes a minor flaw (e.g., a module was not enabled because it was already loaded before)
Note
You can (un-) load several modules at time. The exit status will only reflect the most serious issue (where a minor flaw beats no error,
but a fatal error beats a minor flaw). This means, if a minor flaw was encountered as well as a fatal error, the program will leave with
exit status 1 and stop immediately.
DEPENDENCIES
Debian allows lighttpd modules to formulate dependencies to other modules they depend on. Configuration files are scanned for dependencies
upon load or unload of modules, not at runtime of the web server. Such a magic line has the following format:
# -*- depends: module[, module] -*-
and may appear anywhere in the file. If such a line is found, the extracted name is interpreted as dependency to another lighttpd module.
lighty-enable-mod will seek available configurations to satisfy this dependency and will recursively enable all dependencies found on its
way. lighty-disable-mod will disable reverse dependencies recursively.
SEE ALSO lighttpd(1)AUTHOR
Program and man pages were originally written by Krzysztof Krzyaniak <eloy@debian.org> and later modified by Arno Toll <debian@toell.net>
2006-01-11 LIGHTYENABLEMOD(1)