Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k
Source Link

$1 means for .... ? without any input?

I have one program that starts with this line. What does this mean? I am having trouble googling because of the dollar sign.

How come $1 without any parameters? And what does it mean by -d here?

  if [ -d $1 ]; then

And does semi-colon come even if the if-condition does not even start? I thought semi-colon comes only at the end of statement or at the end of condition like

   if () {  };