${ECHO_CMD} meaning?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ${ECHO_CMD} meaning?
# 1  
Old 07-21-2011
${ECHO_CMD} meaning?

Hi All,

I'm nik and i'm a newbie in shell script. may i know what is the meaning of the data below in shell.
Code:
${ECHO_CMD} and {TEE_CMD} -a

is this a message like print?

Thanks,
-nikki

Last edited by Scott; 07-21-2011 at 04:21 AM.. Reason: Code tags
# 2  
Old 07-21-2011
"echo" is command used for printing purpose
eg : below will print test to the prompt

Code:
echo "test"

"tee -a" command is used for appending purpose
You can check using man pages how to use these commands

Code:
man tee

Cheers
Harish
# 3  
Old 07-21-2011
Quote:
Originally Posted by harish612
"echo" is command used for printing purpose
eg : below will print test to the prompt

Code:
echo "test"

"tee -a" command is used for appending purpose
You can check using man pages how to use these commands

Code:
man tee

Cheers
Harish
oh i see.. now i know.. thank you very much sir.

---------- Post updated at 03:12 PM ---------- Previous update was at 02:56 PM ----------

Sir may i know what is the meaning of this
Code:
script=`${BN_CMD} $0`
PRODUCT_NAME_CONV=`${BN_CMD} $0 | ${AWTS_CMD} -F".sh" '{print $1}'`
INPUT_PARAM="$1"

BN_CMD="/niks/ban/basename
AWTS_CMD="/niks/ban/awk

Thanks,

Last edited by Scott; 07-21-2011 at 04:22 AM.. Reason: Code tags, please...
# 4  
Old 07-21-2011
you can check for both the commands using man page

man awk
man basename

you can use in below manner . this code will give you only test in the output
Code:
basename test.txt .txt

you can use awk for almost ever thing using different combinations
can use for substr , printing any argument for n number of things

will show you few examples below

Code:
ll -rt | awk '{print$3}'

will print the third argument in the ll-rt o/p . By default delimeter used is space
Code:
ll -rt  | awk '{print $NF}'

will print the last argument of ll -rt o/p which will be the file or directory name
Code:
echo "test" | awk '{print substr ($0,2,3)}'

will print "est" in the o/p similar to our pl/sql fn substr
Code:
echo "test/test1" | awk -F "/" '{print$1}'

will print "test" in the o/p . Filtering is done on basis of "/" and print
1st argument i.e on left "/"

Similarly you can do many many more things with "awk" command

Cheers
Haish
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Meaning of $1^

Hello everyone, I'm looking for the meaning of this expression, as I don't understand it quite clearly : $1^ What do you think it could be? I thought either: - match lines starting with argument 1 but it should be ^$1 - turn line around : word becomes drow Thanks in advance for your... (4 Replies)
Discussion started by: bibelo
4 Replies

2. Shell Programming and Scripting

Meaning

Please let me know the meaning for the below statements in shell scripting. 1) exit -99 -------------------------------- 2) set prgdir = `pwd` set runFlag = runFlag:FALSE ------------------------------------- 3) if (-f $prgdir/maillst.eml) then set distEmail = `cat $prgdir/maillst.eml`... (1 Reply)
Discussion started by: lg123
1 Replies

3. UNIX for Dummies Questions & Answers

meaning of <<!

Hi all, I wanna know the meaning of the last word "<<! " sudo su - user <<! please help on this !!!! (1 Reply)
Discussion started by: sudharson
1 Replies

4. Shell Programming and Scripting

^$$ meaning

Hi , Can anyone please let me know whta the follwoing piece of code for ScriptName=${0##*/} if pgrep -f "$ScriptName" | grep -v "^$$\$" ; then echo `date`": Sctipt $ScritName is already runnig" exit fi Thnx a lot in advance Please use code tags when posting data and code... (8 Replies)
Discussion started by: Pratik4891
8 Replies

5. Shell Programming and Scripting

meaning of !*

can someone please tell what !* means in shell syntax. Regards, (3 Replies)
Discussion started by: busyboy
3 Replies

6. Shell Programming and Scripting

What is the meaning of $_

Hi, Can somebody tell the usage of "$_" cd $_ ? and ls $_ ? (4 Replies)
Discussion started by: giri_luck
4 Replies

7. UNIX for Dummies Questions & Answers

what the meaning of #*

can some one please tell the meaning of the second statement i.e n=${m#*=} i couldnt get the meaning of the #*= 1.) m="mohit=/c/main/issue" echo $m result ----------- mohit=/c/main/issue 2.) n=${m#*=} echo $n RESULT ------- /c/main/issue (1 Reply)
Discussion started by: narang.mohit
1 Replies

8. UNIX for Dummies Questions & Answers

Use and meaning of $*

Can someone explain the use and meaning of "$*" expression. (2 Replies)
Discussion started by: sinpeak
2 Replies

9. AIX

meaning of ${0%${0##*/}}

. ${0%${0##*/}}Script_Name if i issue this command, it is executing the script. can any one tell what is the meaning of ${0%${0##*/}} (7 Replies)
Discussion started by: nyelavarthy
7 Replies

10. Shell Programming and Scripting

what is the meaning here?

#!/bin/sh $ORACLE_HOME/bin/sqlplus -S $orauserid/$orapasswd@$oradb << _TMP alter session set nls_date_format = 'YYYYMMDD HH24:MI'; set linesize 100 set pagesize 400 ok the above is part of a script..i just wanna know what does sqlplus -S means?? as in why we need to insert the -S behind? (2 Replies)
Discussion started by: forevercalz
2 Replies
Login or Register to Ask a Question