Skip to main content
Post Closed as "Duplicate" by Gilles 'SO- stop being evil' bash
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
Post Reopened by terdon
Post Closed as "Needs details or clarity" by Braiam, jasonwryan, Anthon, Michael Homer, chaos
added 90 characters in body
Source Link
slm
  • 380k
  • 127
  • 793
  • 897

hey imI'm writing this onin my script it. It has other body parts but i got stockI'm getting stuck on this part only.

if [[$# == $year $month $day ]] ; then

cal $day $month $year fi

if [[$# == $year $month $day ]] ; then cal $day $month $year fi 

when iWhen I run this it give me this msg [[3: command not found

[[3: command not found 

soSo what is the problem? is it a syntax or actual command?

year=$(echo "$year" | bc) month=$(echo "$month" | bc) day=$(echo "$day" | bc) if [[$# == $year $month $day ]] ; thenHere's the rest of my script if that helps:

cal $day $month $year fi

year=$(echo "$year" | bc) month=$(echo "$month" | bc) day=$(echo "$day" | bc) if [[$# == $year $month $day ]] ; then cal $day $month $year fi 

hey im writing this on my script it has other body parts but i got stock on this part only.

if [[$# == $year $month $day ]] ; then

cal $day $month $year fi

when i run this it give me this msg [[3: command not found

so what is the problem? is it syntax or actual command

year=$(echo "$year" | bc) month=$(echo "$month" | bc) day=$(echo "$day" | bc) if [[$# == $year $month $day ]] ; then

cal $day $month $year fi

I'm writing this in my script. It has other parts but I'm getting stuck on this part only.

if [[$# == $year $month $day ]] ; then cal $day $month $year fi 

When I run this it give me this msg:

[[3: command not found 

So what is the problem? is it a syntax or actual command?

Here's the rest of my script if that helps:

year=$(echo "$year" | bc) month=$(echo "$month" | bc) day=$(echo "$day" | bc) if [[$# == $year $month $day ]] ; then cal $day $month $year fi 
Source Link
Loading