In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands.
How do I write the "do nothing" statement in the following example?
Example:
if (( "$x"="1" && "$y"="a" && "$z"="happy" ))
then
do nothing
else
command
command
fi... (3 Replies)
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
Hi,
I have a ksh script where I have an awk statement to exclude a few items... but my "few items" has now grown substantially and I'm looking for a nice compact way of doing this. Maybe putting the exceptions into a file or something? Any suggestions greatly appreciated.
# Excluded items... (1 Reply)
I'm trying to run the logic below but get a `<' is not matched error message when I return a Y or y;
printf "Run this ? : "
read RESP
case $RESP in
Y|y)
cat <<EOF > file
today is Monday
EOF ;;
N|n)
exit 1 ;;
esac
Any ideas? (2 Replies)
i want to get user input like this
please tell which option to chose
1. mango 2. tango 3. rango
if user chooses mango
then it should execute a set of statements and again ask like this
what do you want to do
1.add 2.subtract 3.exit
when i choose exit it should goto my previous... (1 Reply)
i want to get user input like this
please tell which option to chose
1. mango 2. tango 3. rango
if user chooses mango
then it should execute a set of statements and again ask like this
what do you want to do
1.add 2.subtract 3.exit
when i choose exit it should goto my previous menu... (4 Replies)
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Hi Guys,
Any good reference for me to perform user database update statement on table which has quite number of fields could be updated depend on user specified column name and the value to assign.
All the approaches are welcome and appreciated.
Thanks. (1 Reply)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
I'm having an issue with bash read input when using a case statement.
The script halts and doesn't read the input on the first loop. if I hit enter then the scripts starts to respond as expected. Need some help here.
defaultans=8hrs
read -e -i $defaultans -p "${bldwht}How long would you like... (5 Replies)
Discussion started by: woodson2
5 Replies
LEARN ABOUT DEBIAN
crashmaint
CRASHMAINT(1) CrashMail CRASHMAINT(1)NAME
crashmaint - Do maintanence on CrashMail message bases
SYNOPSIS
crashmaint [MAINT] [PACK] [VERBOSE] [SETTINGS filename] [PATTERN pattern]
DESCRIPTION
Deletes old messages according to KEEPNUM and KEEPDAYS in crashmail.prefs. The program can do two different operations on a messagebase,
MAINT and PACK. The meaning of these two modes are different for different messagebase formats.
*.msg MAINT deletes messages and PACK renumbers the area.
JAM MAINT sets the Deleted flag for the messages. PACK removes all messages with the Deleted flag from the messagebase.
Both MAINT and PACK can be specified at the same time.
OPTIONS
SETTINGS filename
Specifies that another config file than the default should be used. You can use the environment variable CMCONFIGFILE to set the
default configuration file.
PATTERN pattern
Lets you perform the operations on only some of your areas.
VERBOSE
Gives you a lot of information which you don't really need.
EXAMPLES
crashmaint MAINT PACK PATTERN R20_AMIGA*
SEE ALSO crashmail(1)AUTHOR
CrashMail is written by Johan Billing <billing@df.lth.se>
This manual page was written by Peter Karlsson <peter@softwolves.pp.se>
Johan Billing 1999-08-01 CRASHMAINT(1)