linux - Small install script in sh -


i programmed small installation program in sh.

code:

#!/bin/sh  echo $ 1  if [ "$1" ! = "install"];   echo "why not install?  else  echo "installing ..."  fi 

and throws error:

install

[: 10: missing ]

installing ...

edit: rolled incoperation of answers question.

if [$1 != "install"]; 

should be

if [ "$1" != "install" ]; 

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

ASP.NET Javascript: window.open won't work twice -

jquery - Opera does not change the height of the page. Why? -