echo doesnot show output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting echo doesnot show output
# 1  
Old 01-21-2008
echo doesnot show output

hi every one ,

i m new in unix . i m trying shell scripting .

set v = abc
echo $v

but it does not show any output .
please help me
# 2  
Old 01-21-2008
Quote:
Originally Posted by samy123
hi every one ,

i m new in unix . i m trying shell scripting .

set v = abc
echo $v

but it does not show any output .
please help me
Examples

Under csh

set mydept=Sales

Under BASH and most other shells:

mydept=Sales

To make the change permanent:

export mydept
# 3  
Old 01-21-2008
Did you try without space between the assignment?
set v=a

Thanks
Nagarajan G
# 4  
Old 01-21-2008
Quote:
Originally Posted by ennstate
Did you try without space between the assignment?
set v=a

Thanks
Nagarajan G
dear sir
i have tried this thing already but problem is still with script
# 5  
Old 01-21-2008
Thanks for help
i was using set for assigning value
v=abc
echo $v

is working fine .
thanks again
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using backspace in echo to show process count

i have something like this tablesName="abc def hij akn ... etc etc" count=0 for i in $tablesName do echo -en "\b\b\b\b\b\b\b\b\b\b\b\b\bTableCount: $count" count=`expr $count + 1` done the above is just a description wha i need is when the loop executes the... (1 Reply)
Discussion started by: vivek d r
1 Replies

2. Shell Programming and Scripting

Script that will show output starting from 24-hours earlier to present

Hi Guys, Good day! I hope you could help me on this, I have a file that conatins output upon executing cat /var/log/messages, then what I want is to get the logs that has been generated only starting from 24-hours earlier at the time of actual execution of the script. Is this possible? Best... (9 Replies)
Discussion started by: rymnd_12345
9 Replies

3. Shell Programming and Scripting

Need help in echo output

Hi All, I have code to get the UUID and capacity for the LUN from CX -arry. I need the output in this format LUN Number UUID Space in MB LUN 238 60:06:01:60:C2:56:11:00:28:36:67:59:11:04:DE:11 122880 But Now iam getting this... (3 Replies)
Discussion started by: ranjancom2000
3 Replies

4. Shell Programming and Scripting

Bash script show Kill system output

Hi we are calling kill -9 $pid command from bash script it gives below output, but we need to hide the output. i tried /dev/null but ni luck. is there any alternate way to schive this. ../kill_scr.sh: line 42: 1891 Killed /tmp/anr_rest_mul_wc.sh Soalris 10. ... (2 Replies)
Discussion started by: sachinbutala
2 Replies

5. Shell Programming and Scripting

Show pages on a script's big output

Hi again: I have this code which gives an large output(several screens), and I want to display on screen at a time (like more does)....how can I do this? echo echo "Los roles en el sistema son:" echo lsrole -a dfltmsg ALL|sed 's/dfltmsg=/Descripcion=/' thanks Israel. (4 Replies)
Discussion started by: iga3725
4 Replies

6. Shell Programming and Scripting

Two files one file is dependent and it does not show an output

xxxxx (2 Replies)
Discussion started by: vinayrao
2 Replies

7. Shell Programming and Scripting

Show "\n" in echo statement

Hi, I have below statement: echo ""print LOG \n"" Here, I get output: print LOG n But, I want output like this: print LOG \n Can someone please suggest the remedy for this? (5 Replies)
Discussion started by: jal_capri
5 Replies

8. UNIX for Advanced & Expert Users

prtdiag -v show no output

Dear All....Help required prtdiag -v command shows no output on my V440 server. Following is the details: root@sdp16b>prtdiag -v root@sdp16b> root@sdp16b>uname -a SunOS sdp16b 5.9 Generic_122300-31 sun4u sparc SUNW,Sun-Fire-V440 root@sdp16b>echo $path /usr/sbin /usr/bin /usr/sbin... (6 Replies)
Discussion started by: Junaid
6 Replies

9. UNIX for Dummies Questions & Answers

What is the output of echo *

Hi all, Kindly let me know the output of echo * command. (4 Replies)
Discussion started by: shailja
4 Replies

10. Shell Programming and Scripting

piping output to echo

Hi, I was wondering why ls * | echo does not print the contents of the directory to the screen? The way I see it, ls * returns a whole lot of information, and then we pipe all this info to echo, so surely it should all come to our screen! Is there a serious flaw in my understanding? ... (3 Replies)
Discussion started by: A1977
3 Replies
Login or Register to Ask a Question