Hi everyone,

What does @ mean in shell scripts?


The @ command can be used for computations. For example, if you have shell variables $X and $Y, you can set a third variable $Z to their sum by

@Z = $X + $Y

that help at all?

Thamks for that Serunson,
But I've seen $@ in some shell scripts,what does this mean?


$@ is all of the parameters passed to the script. For instance, if you call ./someScript.sh foo bar $@ will be equal to foo bar . I have never seen the context Serunson described (actually, I got an error trying to use it...)

dont listen to serunson. he has never used linux in his life (i know, hes my friend) he just tries to help by using google etc

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.