Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-27-2014, 11:26 PM   #1
LQ Newbie
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
Whats the use of () -parentheses

Whats the use of () -parentheses
In the below ex: a=($*) what it means

Shell script to print the command line arguments in reverse order
if [ $# -eq 0 ]
echo -e "\nNo arguments entered\n"
echo "arguments are"
echo $*
let x=$#
echo "arguments in reverse order are : "
while [ $x -ne -1 ]
echo -n " ${a[$x]}"
let x=x-1
Old 02-27-2014, 11:36 PM   #2
Senior Member
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
In this case you are creating a bash array named "a"

A good introduction to bash arrays

Please wrap code with bb code tags

example code box
2nd line
< actually 4 spaces here >3rd line

example code box
2nd line
     3rd line

Last edited by Firerat; 02-27-2014 at 11:37 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl REGX match between parentheses Boomn4x4 Programming 5 11-30-2012 01:42 AM
Help with sed and parentheses. Allis Linux - Newbie 4 12-24-2011 04:16 PM
what is the meaning of underline that before parentheses? skiron.liu Programming 1 06-22-2010 10:35 AM
using sed with parentheses in perl beebop Linux - General 2 07-21-2005 11:41 PM
Emacs config and parentheses jrdioko Linux - Software 0 07-16-2005 04:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration