very simple shell thing..


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers very simple shell thing..
# 1  
Old 06-26-2003
Question very simple shell thing..

set a = 5
set b = a

echo $b
a // will print a

I want to get

echo ${$b} // something expression like this to get value of 'a'

by accessing the value of b.
5 ie. fetching the value of a with the inputs of b ( frm b --thro a ---5)

Is it possible to execute something like this?

any help will be appreciated,

Thanks,
sskb
Smilie
sskb
# 2  
Old 06-26-2003
Change set b = a to set b = $a
# 3  
Old 06-26-2003
sskb, did you want to set b equal to a just that once, or set b in such a way that whenever the value of a changes, the value of b changes as well, like have b be a pointer to a?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with simple Shell Script

Hi , I am in need of simple shell script that has one input file containing some words Input file 1 : ****ALEX***JOHN*******VIRGIL***** CHRITINE*****FAISAL*****DON***** ****ALEX***JOHN*******VIRGIL***** CHRITINE*****FAISAL*****DON***** ****ALEX***JOHN*******VIRGIL*****... (6 Replies)
Discussion started by: kmanjuna
6 Replies

2. Shell Programming and Scripting

Help with very simple Shell Script

Write a shell that receives as parameters two folder names. Copies the second folder as subfolder into the first one. Only folders and files with the '.txt' extension will be copied. Detect and avoid recursive copy. This is what I have to do and I don't know where to start. In fact, I started... (5 Replies)
Discussion started by: sharpsh07er
5 Replies

3. Shell Programming and Scripting

Help me with simple shell script.

Hello forum members, I have to redirect a output of command into a text file inside a script file but iam getting an errors.so please see below script and suggest me for corrections. #!/bin/ksh read IP_ADD echo nslookup $IP_ADD 2>&1| tee log1.txt cat /amex/gcst/siva/Testr/log1.txt... (6 Replies)
Discussion started by: rajkumar_g
6 Replies

4. Shell Programming and Scripting

simple shell

Hi everyone I am writing a simple shell but the background '&' not working i dont understand this is my fork pid_t pid; pid=fork(); if(pid<0) { printf("\nChild process failed."); exit(1);... (2 Replies)
Discussion started by: basicxx
2 Replies

5. Shell Programming and Scripting

simple shell - how to get a parameter typed in a shell script

Hi, I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Discussion started by: cmitulescu
4 Replies

6. Shell Programming and Scripting

shell script which will delete every thing under a directory except a single sub dire

write a shell script which will delete every thing under a directory except a single sub directory (2 Replies)
Discussion started by: alokjyotibal
2 Replies

7. Shell Programming and Scripting

Need help in a simple shell script

Hi All I have requirement to write a shell script which would look for the userid which is logged in , and once the User id is found i would delete certain lines from a parameter file .. here is what iam using a=ps -o user | grep -v user | uniq then using an if condition and... (4 Replies)
Discussion started by: raghav1982
4 Replies

8. UNIX for Dummies Questions & Answers

Cannot do this simple thing

I think its a bash thing and it is really annoying me.. its difficult to explain the problem but I will try.. When I type a command on the shell prompt... then lets say I go back to the 2nd letter and correct a typo.. after that I cannot get the cursor beyond the last alphabet that I had... (4 Replies)
Discussion started by: tantric
4 Replies

9. UNIX for Advanced & Expert Users

I need of a simple shell script

Hi, I need of a simple shell script to launch a perl script. The complet path of the script is: /export/home/x2693/project/v02/appliancemanagement.pl (2 Replies)
Discussion started by: Minguccio75
2 Replies

10. Shell Programming and Scripting

simple shell scripts

hi everyone... i'm new to this shell programming and i want help with the following question... i hope someone can help me ...pls plsssssssssss ========================================================== the question ========================================================== A number of... (1 Reply)
Discussion started by: moon14
1 Replies
Login or Register to Ask a Question