You should notice that inside a $((...)) the expression is treated as if it were quoted and the variables may be referred by name without using the `$' symbol.
Hello, i'm unable to write a correct if... statement to evaluate the $? variable.
Could anybody send to me an example? for example, this lines of code didn't work...
if ; then
etc etc
if ; then
etc etc
Thank you in advanced. (5 Replies)
I want to combine 2 conditional statements by using -o in bash, but it won't work.
if ; then
echo "The number needs to be between 0 and $nr"
fi
Each time i execute the file it says:
./selectCitaat: line 10: syntax error near unexpected token `$1' (3 Replies)
Hi
I work in ksh88.
I am trying to group a few conditional statements to check for the value of the variable DATE, but getting a syntax error:
$DATE=1836
$] && ]] || ] && ]]; then
ksh: syntax error: `]]]' unexpected
is there a way to user "OR" between first part:
if ] && ]
and... (3 Replies)
Hi I need a script with an if statement that goes.
I need it to search through all files within a directory with the extension .test if it finds the string '71502FSC1206' then do
sed 's/71502FSC1206/\n&/g' > send.test
If it finds the string '715MCH' or '715JAC' then I need it to move the... (1 Reply)
Hey guys,
Currently trying to write a wee script that runs only when logged in as one of two users. The rest of the script is working fine, but no matter what user I try to run it as, it always fails! This is the puzzling part:if ]; then
echo "Run script as admin "
exit 1
else... (6 Replies)
I'm having trouble trying to create a BASH shell script.
I want the user to input a command "cat file_name.c" and then the shell script will delete all comments "/* */" from file_name.c else exit.
So far I have this:
#!/bin/bash
read "cat file" // User will input command cat... (7 Replies)
Hi Gurus,
I have the below BASH code which does not works for upper case alphabets except Z (upper case Z).
What may be the reason. Also escape sequences like \n, \t, \b, \033(1m \033(0m (For bold letter) are not working.
case $var in
)
echo "Lower case alphabet"
;;
... (7 Replies)
I have the basic command written in bash
for element in 1 2
do
if ]; then
set el = "t"
else
set el = "p"
fi
done
but i get the following error
syntax error near unexpected token `for'
` for element in 1 2'
What should i do differently? (3 Replies)
I have the following code in bash, however "set red frmt" is not displayed.
echo "iarg_rd = $iarg_rd"
iarg_rd="2"
if ; then
echo "Hello World"
fi
if ; then
frmt="${gap}${!frmt_titl_yl}"
elif ; then
frmt="${gap}${!frmt_titl_bk}"
elif ; then
echo... (2 Replies)
Hi all,
i need a equivalent for the statement i run in bash, so it would also run in other shells. Specially i need it for ksh to run on AIX.
Here the statements:
exec > >(tee -a $log)
exec 2> >(tee -a $log >&2)
Thanks. (5 Replies)
Discussion started by: Kosak
5 Replies
LEARN ABOUT DEBIAN
ikiwiki-calendar
ikiwiki-calendar(1) General Commands Manual ikiwiki-calendar(1)NAME
ikiwiki-calendar - create calendar archive pages
SYNOPSIS
ikiwiki-calendar [-f] your.setup [pagespec] [startyear [endyear]]
DESCRIPTION
ikiwiki-calendar creates pages that use the ikiwiki/directive/calendar directive, allowing the archives to be browsed one month at a time,
with calendar-based navigation.
You must specify the setup file for your wiki. The pages will be created inside its srcdir, beneath the archivebase directory used by the
calendar plugin (default "archives").
To control which pages are included on the calendars, a ikiwiki/PageSpec can be specified. The default is all pages, or the pages specified
by the comments_pagespec setting in the config file. A pagespec can also be specified on the command line. To limit it to only posts in a
blog, use something like "posts/* and !*/Discussion".
It defaults to creating calendar pages for the current year. If you specify a year, it will create pages for that year. Specify a second
year to create pages for a span of years.
Existing pages will not be overwritten by this command by default. Use the -f switch to force it to overwrite any existing pages.
CRONTAB
While this command only needs to be run once a year to update the archive pages for each new year, you are recommended to set up a cron job
to run it daily, at midnight. Then it will also update the calendars to highlight the current day.
An example crontab:
0 0 * * * ikiwiki-calendar ~/ikiwiki.setup 'posts/* and !*/Discussion'
TEMPLATES
This command uses two templates to generate the pages, calendarmonth.tmpl and calendaryear.tmpl.
AUTHOR
Joey Hess <joey@ikiwiki.info>
ikiwiki-calendar(1)