UNIX assignment or value returns


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers UNIX assignment or value returns
# 1  
Old 04-02-2015
UNIX assignment or value returns

Hi Folks,

In UNIX, I am quite confused on how to use or when to use ${} $() $ .

For Example ,

if i use variable called "i" then when do i use,

${i}
$(i)
$i

or sometime with arithmetic operations $(i+1) like this or ${i}+1

quite confused... Please help...

clarification would be helpful in many terms.


Regards,
Nandy.
# 2  
Old 04-02-2015
Hi.

For bash, this may be useful Reference Cards

For many such aids, go to Quick Reference Cards then scroll down to the section on Linux, look at http://www.digilife.be/quickreferenc...0Reference.pdf and other Bourne shells will have similar constructs.

Best wishes ... cheers, drl
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need a little help with assignment

Hello all im currently working on this assignment and a little stump on how to check for an argument heres the instructions: Step 4: Modify your script so that if there is an argument called TestError you display the following error message with your usage statement. TestError found Example:... (1 Reply)
Discussion started by: bsn3971
1 Replies

2. Homework & Coursework Questions

Help Assignment !! :D

Q-1 Write a shell script in Unix that lists files from your current working directory · By modification time when called with lm · By access time when called with la. By default, the script should show the listing of all the files in the current directory. Q-2 Write a shell script which... (1 Reply)
Discussion started by: Vishank Parikh
1 Replies

3. Shell Programming and Scripting

Help Assignment !! :D

Q-1 Write a shell script in Unix that lists files from your current working directory · By modification time when called with lm · By access time when called with la. By default, the script should show the listing of all the files in the current directory. Q-2 Write a... (1 Reply)
Discussion started by: Vishank Parikh
1 Replies

4. Homework & Coursework Questions

Assignment Help

1. List commands to create the directory hierarchy $HOME/a/b/c in vi to replace all occurences of TMP with tmp in lines 1 through 10 in vi to replace first occurence of CPU_file with DISK_file at line 15 2. Explain with a very simple example, usage of "ls -a" 3. What do the... (2 Replies)
Discussion started by: jessesaini
2 Replies

5. Homework & Coursework Questions

UNIX- Database creating/viewing/updating assignment

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have posted the assignment below, I am new to unix programming and am having a very hard time knowing where... (5 Replies)
Discussion started by: student1989
5 Replies

6. Homework & Coursework Questions

Unix Spell Checker Assignment

hello, im a new member to the forum and im doing a assignment for unix command and we have to make a spell checker and im a little confused about the directions .. ill post them below and continue.. Northern Illinois University CSCI 330-Unix Command Write a shell script that implements a... (1 Reply)
Discussion started by: bravens52
1 Replies

7. Shell Programming and Scripting

RE value assignment

Hi all How do I assign a pattern to a variable after a match is found using a regular expression in PERL? For example using a regular expression (RE) and matching as given if ($_ =~ /(?:\s*+\s*,)*\s*+\s*/) I want to assign the pattern matched by the RE to a variable. e.g. given the... (4 Replies)
Discussion started by: my_Perl
4 Replies

8. UNIX for Dummies Questions & Answers

Unix Assignment, need help!

I have been working on this for the past hour and I can not figure it out :( What command would you give to produce a listing of the names of all the text files in ~/UnixCourse or its subdirectories (possibly nested several layers deep) followed immediately by the first line of text within that... (10 Replies)
Discussion started by: gordonheimer
10 Replies

9. What is on Your Mind?

New Assignment

All Sys Administrators, With due respect I would like to know what should be BEST Things to do when LEAVING one job , and what Precaution MUST be taken while taking over new JOB?? Please Discuss in detail the STEP to be taken for both the TIME ?? (3 Replies)
Discussion started by: vakharia Mahesh
3 Replies

10. UNIX for Dummies Questions & Answers

how to do my assignment?????

my lecturer want to do an assignment about telnet server..first, he want us to download the telnet server..then he want we do about copy files and share files by using the telnet server....what is that??? and one more thing is how to do 'ping'???? (1 Reply)
Discussion started by: amelia
1 Replies
Login or Register to Ask a Question