Sponsored Content
Top Forums Shell Programming and Scripting any explanation for thsi shell script behaviour Post 9119 by xiamin on Tuesday 23rd of October 2001 04:39:06 AM
Old 10-23-2001
Hmm Livin free

Both of the scripts

a)sh myscript.sh
b). ./myscript.sh

are in my path .but i dont undersatnd the difference in behaviour

regards
Hrishy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

explanation for a script

Guys, was wondering what the meaning of the below bit is ? awk -F ' ' '{print $1 " " $2 ;}' $TEMPFILE | (rm -f $TEMPFILE; sed 's/$/ '"$box"'/g' > $TEMPFILE) Can anyone explain this in detail? what is the significance of rm -f $TEMPFILE here? What all IO/buffering happens here ?How the... (0 Replies)
Discussion started by: hashin_p
0 Replies

2. Shell Programming and Scripting

Spaces behaviour in shell

Hello, I am a bit puzzled by the way my shell treats spaces in filenames. An example will be way clearer than any explanation I can make: $ ls test\ file\ with\ spaces test file with spaces $ var="test\ file\ with\ spaces" $ echo $var test\ file\ with\ spaces $ ls $var ls: cannot... (4 Replies)
Discussion started by: SDelroen
4 Replies

3. Shell Programming and Scripting

Explanation for interesting sed behaviour?

This is my first post so hi to you all. I have browsed these forums in the past and what a great community and resource this is! Thanks to all the contributors ... I look forward to being able to give something back. In the meantime, I have a little conundrum concerning sed. My very simple... (6 Replies)
Discussion started by: Gavster
6 Replies

4. UNIX for Dummies Questions & Answers

shell: reconcile language and sort behaviour

Hi Don't know if this is a dummy question, but let's give it a try. I yesterday had a problem with undefined behaviour in the sort shell command (I'm using bash), leading to different sort orders without apparent reasons. I resolved this by typing export LC_ALL="C" export LC_COLLATE="C"... (5 Replies)
Discussion started by: jossojjos
5 Replies

5. Shell Programming and Scripting

Shell Script Explanation

Hello, I have seen this script on this site. I understand most of it. However I am a bit stuck on the part in red. It appears to be expanding for file in *.zip do zipdir=${file%.*} mkdir $zipdir || echo "unable to create $zipdir" cp $file $zipdir || echo "unable to copy $file"... (3 Replies)
Discussion started by: jaysunn
3 Replies

6. Shell Programming and Scripting

need an explanation on this script...

The following script will create a directory in a directory and will go on as many times as the number you will give in. I am trying to find out how it works ... can someone please help me with that? #!/bin/sh #create a variable and set it to 1 n=1 #start a loop as... (3 Replies)
Discussion started by: I-1
3 Replies

7. Solaris

Explanation of script

Hello Guys, can someone help explain the script below for me? I will really appreciate it. vi db_script #!/bin/sh echo .cron job run on.`date`> cronjob.txt df -h >> cronjob.txt echo welcome to home (2 Replies)
Discussion started by: cjashu
2 Replies

8. Shell Programming and Scripting

Korn shell behaviour in AIX

Hi, Consider the code snippet below: fun() { while read x do echo $x done < somefile_that_does_not_exists } fun echo I am here Korn shell on HPUX prints the message "I am here", while the behaviour is different on AIX korn shell. We do not get the message on AIX. Any... (5 Replies)
Discussion started by: 116@434
5 Replies

9. Shell Programming and Scripting

What does this shell script do? Need in depth explanation please

Hi My friend wrote this particular script and won't tell me what it does, and when I run it I don't understand it. What does the entire script do with specifics please. Thanks Bob #!/bin/bash current=0 while ; do if ; then echo ${current} current=$((${current}+1)) fi done (1 Reply)
Discussion started by: shadowknight777
1 Replies

10. Shell Programming and Scripting

Shell script explanation

Hey, can someone explain me this script? i=0 while read WORT do echo $WORT|grep a>/dev/null || echo$WORT|grep B>dev/null || let i=$i+1 done echo $i The first lane initializie the variable i with the value of 0. The loop line has 3 different options because of ||. The only option I... (10 Replies)
Discussion started by: newuser21
10 Replies
AMQP-CONSUME(1) 						 RabbitMQ C Client						   AMQP-CONSUME(1)

NAME
amqp-consume - Consume messages from a queue on an AMQP server SYNOPSIS
amqp-consume [OPTION...] {command} [args...] DESCRIPTION
amqp-consume consumes messages from a queue on an AMQP server. For each message that arrives, a receiving command is run, with the message body supplied to it on standard input. amqp-consume can consume from an existing queue, or it can create a new queue. It can optionally bind the queue to an existing exchange. By default, messages will be consumed with explicit acknowledgements. A message will only be acknowledged if the receiving command exits successfully (i.e. with an exit code of zero). The AMQP "no ack" mode (a.k.a. auto-ack mode) can be enable with the -A option. OPTIONS
-q, --queue=queue name The name of the queue to consume messages from. If the --queue option is omitted, the AMQP server will assign a unique name to the queue, and that server-assigned name will be dixsplayed on stderr; this case implies that an exclusive queue should be declared. -e, --exchange=exchange name Specifies that an exclusive queue should be declared, and bound to the given exchange. The specified exchange should already exist unless the --exchange-type option is used to request the creation of an exchange. -r, --routing-key=routing key The routing key for binding. If omitted, an empty routing key is assumed. -d, --declare Forces an exclusive queue to be declared, even when it otherwise would not be. That is, when a queue name is specified with the --queue option, but no binding to an exchange is requested with the --exchange option. -A, --no-ack=routing key Enable "no ack" mode: The AMQP server will unconditionally acknowledge each message that is delivered, regardless of whether the target command exits successfully or not. EXAMPLES
Consume messages from an existing queue "myqueue", and output the message bodies on standard output via cat: $ amqp-publish -q myqueue cat Bind a new exclusive queue to an exchange "myexch", and send each message body to the script myscript, automatically acknowledging them on the server: $ amqp-consume -A -e myexch ./myscript 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-CONSUME(1)
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy