12-03-2008
thnx for the reply , now i m giving like this
#!/bin/ksh
if [[ -s "$DD_INDD" ]]; then
echo "data"
ERROR=$?
echo "$ERROR"
else
echo "****************************"
echo "**** ERROR - FILE EMPTY ****"
echo "****************************"
ERROR=$?
echo "$ERROR"
fi;
exit
agaiin the same issue
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a TEST.dat file. As a clean up process, I have to delete the TEST.dat file if it is empty. Basically, I don't want to delete TEST.dat if it contains anything in it but want to delete TEST.dat if it contains any spaces or nothing in it.
Is there a command to check if the file... (2 Replies)
Discussion started by: rkumar28
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
I need your help.
How can I create an empty filename with a specific size, in hp-ux?
Regards,
Mizi (2 Replies)
Discussion started by: Mizi
2 Replies
3. Shell Programming and Scripting
How do I check to make sure a file is not zero bytes?
Something like:
if
then
????? (7 Replies)
Discussion started by: lesstjm
7 Replies
4. UNIX for Dummies Questions & Answers
hi all:
my solaris FIND does not support
find myFolder -type d -empty
how can i find the empty folders?
thanks! (7 Replies)
Discussion started by: lasse
7 Replies
5. Shell Programming and Scripting
hi
how can I determine, if a file is empty or not?I am using read line clause.
The script should be like:
while read line
do
if(file is empty) then;
......
done < $blacklist (1 Reply)
Discussion started by: tjay83
1 Replies
6. Shell Programming and Scripting
how can i use while loop ?
while file is empty do....
if not empty do .....
in bash (1 Reply)
Discussion started by: Trump
1 Replies
7. Shell Programming and Scripting
I have a program that takes a file in which I use a sed to remove some data that is not needed. If all of the data is removed. I want to grep for that in the file and print that there is no data left in the file. When I use sed, I replace a word with nothing but it still seems to leave a return... (5 Replies)
Discussion started by: plawr
5 Replies
8. Shell Programming and Scripting
Hi All,
I have a piece of perl code in which I DON'T want to delete a file rather empty out the contents, here is the code -
if ( unlink("$opt_b") == 1 ) {
print_log( "$opt_b deleted", 1 );
}else {
print_log( "Could not delete $opt_b:$!", 1 );
... (5 Replies)
Discussion started by: jacki
5 Replies
9. Shell Programming and Scripting
Hi there,
I'm just starting out with shell scripting and I'm trying to make a test where the script will basically run yum check-update to find out if the server has any available and if it does it e-mails me but if not it will just stop there.
I have it working if there are actually... (7 Replies)
Discussion started by: Imnewtothis
7 Replies
10. UNIX for Dummies Questions & Answers
when I run the following command in AIX (bash),
find ./*
I get the following error.
find: bad status-- ./*
Thats becasuse, its an empty directory. The same works, when there the directory is not empty. Even though the find deesnt have to rerun any result.
My full find command would look... (4 Replies)
Discussion started by: deepakwins
4 Replies
LEARN ABOUT DEBIAN
amqp-declare-queue
AMQP-DECLARE-QUEUE(1) RabbitMQ C Client AMQP-DECLARE-QUEUE(1)
NAME
amqp-declare-queue - Declare (create or assert the existence of) a queue on an AMQP server
SYNOPSIS
amqp-declare-queue [OPTION...] [-d] {-q queue name}
DESCRIPTION
amqp-declare-queue attempts to create a queue on an AMQP server, and exits. If the empty-string is supplied as the queue name, a fresh
queue name is generated by the server and returned. In all cases, if a queue was successfully declared, the (raw binary) name of the queue
is printed to standard output, followed by a newline.
OPTIONS
-q, --queue=queue name
The name of the queue to declare. If the empty string is supplied, a fresh queue name is generated by the server.
-d, --durable
Causes the queue to be declared with the "durable" flag set. Durable queues survive server restarts. By default, queues are declared in
"transient" mode.
EXIT STATUS
If the queue was successfully declared, the exit status is 0. If an error occurs, the exit status is 1.
EXAMPLES
Declare the durable queue "myqueue", and display the name of the queue on standard output:
$ amqp-declare-queue -d -q myqueue
myqueue
Declare a fresh, server-named transient queue, and display the name of the queue on standard output (use amqp-delete-queue(1) to delete it
from the server once you're done):
$ amqp-declare-queue -q ""
amq.gen-BW/wvociA8g6LFpb1PlqOA==
SEE ALSO
librabbitmq-tools(7) describes connection-related options common to all the RabbitMQ C Client tools.
AUTHOR
The RabbitMQ Team <info@rabbitmq.com>
RabbitMQ C Client 2011-01-01 AMQP-DECLARE-QUEUE(1)