06-01-2009
Just a short note besides what has been mentioned in the other posts:
- "then" can be written in the next line, like it is in your code
- add "fi" at the very end to complete the syntax
tyler_durden
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi there
i write one awk script file in shell programing
the code is related to dd/mm/yy to month, day year format
but i get an error
please can anybody help me out in this problem ??????
i give my code here including error
awk `
# date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies
2. Shell Programming and Scripting
Hi All,
Has been a while since I was last on, so I hope everyone has been doing fine. ;)
Would like to know if the below IF statement syntax is correct for a ksh environment. It's been pushed into live as someone had deleted the development copy(!); not withstanding that, the statement now... (3 Replies)
Discussion started by: Cameron
3 Replies
3. UNIX for Dummies Questions & Answers
Hi, can someone please tell me what is wrong with this code? I just want it to check if the file size is greater than 2000kb.
if
Thanks!
---------- Post updated at 09:23 PM ---------- Previous update was at 09:21 PM ----------
I should probably post the full code:
#!/bin/sh... (9 Replies)
Discussion started by: Bengel
9 Replies
4. Shell Programming and Scripting
I'm working on a function in a shell script I'm writing that will eventually take in and print out a list of vendor names and aliases (for my work) Here's the function in question:
addvendorandalias ()
{
echo
echo -n 'Would you like to create a new vendor list (y or n)? '
read answer... (3 Replies)
Discussion started by: Straitsfan
3 Replies
5. Shell Programming and Scripting
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
<statement>
else
<statement>
fi
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Discussion started by: kchinnam
4 Replies
6. Shell Programming and Scripting
Hi,
Is there a way to compare the value in if condition with a list of values.
eg . if ]
then
echo "it's a mammal"
else
echo "its not"
fi
Thanks! (8 Replies)
Discussion started by: neil.k
8 Replies
7. Shell Programming and Scripting
Hi
Can you please tell me what is wrong with this line:
if && ]; then
basically i want to check if x = 12 and F (Filename) end with 'g'. But it is throwing syntax error. (7 Replies)
Discussion started by: rtagarra
7 Replies
8. Shell Programming and Scripting
I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values
tstmb.sh: 1.5321e+08: 0403-057 Syntax error
Below is my code snippet.
#!/bin/ksh
set -x
TODAY=$(date +%y%m%d)
for file in $(ls -rt *.log | tail... (11 Replies)
Discussion started by: kiran1112
11 Replies
9. Shell Programming and Scripting
I want to make the file test condition a variable ($Prmshn in code below).
My goal is to use something like the first three unsuccessful if statetments since the 'if
#!/bin/ksh
test_input()
{
Prmshn=${1}
InFLNm=${2}
ifReq="-$Prmshn $InFLNm"
#the following three if statments fail:
#if ] ;... (10 Replies)
Discussion started by: ms63707
10 Replies
10. UNIX for Beginners Questions & Answers
I'm new to unix and the command line and am trying to learn different commands. I have a file (teledir.txt) that contains a name and phone number for 3 different people. I am writing a script that is to take two positional parameters and I typed out how it should behave:
if <name and number... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT DEBIAN
blaze-remove
BLAZE-REMOVE(1) BlazeBlogger Documentation BLAZE-REMOVE(1)
NAME
blaze-remove - removes a post or page from the BlazeBlogger repository
SYNOPSIS
blaze-remove [-fipqPV] [-b directory] id...
blaze-remove -h|-v
DESCRIPTION
blaze-remove removes a blog post or a page with the specified id from the BlazeBlogger repository.
OPTIONS
-b directory, --blogdir directory
Allows you to specify a directory in which the BlazeBlogger repository is placed. The default option is a current working directory.
-p, --page, --pages
Tells blaze-remove to remove a page or pages.
-P, --post, --posts
Tells blaze-remove to remove a blog post or blog posts. This is the default option.
-f, --force
Disables requiring manual confirmation of each blog post or page removal. This is the default option.
-i, --interactive
Enables requiring manual confirmation of each blog post or page removal.
-q, --quiet
Disables displaying of unnecessary messages.
-V, --verbose
Enables displaying of all messages. This is the default option.
-h, --help
Displays usage information and exits.
-v, --version
Displays version information and exits.
EXAMPLE USAGE
Remove a blog post:
~]$ blaze-remove 10
Successfully removed the post with ID 10.
Remove a page:
~]$ blaze-remove -p 4
Successfully removed the page with ID 4.
Remove multiple blog posts:
~]$ blaze-remove 10 4 6
Successfully removed the post with ID 10, 4 and 6.
Remove multiple blog posts safely:
~]$ blaze-remove -i 10 4 6
Remove the post with ID 10 titled `Debian and Fedora Packages'? y
Remove the post with ID 4 titled `BlazeBlogger 0.8.0 RC2'? y
Remove the post with ID 6 titled `BlazeBlogger 0.8.1'? y
Successfully removed the post with ID 10, 4 and 6.
SEE ALSO
blaze-config(1), blaze-add(1), blaze-list(1)
BUGS
To report a bug or to send a patch, please, add a new issue to the bug tracker at <http://code.google.com/p/blazeblogger/issues/>, or visit
the discussion group at <http://groups.google.com/group/blazeblogger/>.
COPYRIGHT
Copyright (C) 2008-2011 Jaromir Hradilek
This program is free software; see the source for copying conditions. It is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Version 1.2.0 2012-03-05 BLAZE-REMOVE(1)