All pastes #278562 Raw Edit

Something

public text v1 · immutable
·published 2006-12-14 05:04 UTC
rendered paste body
   1 #!/bin/bash
      2 # import-to-anjuta.sh
      3 
      4 if [[ "$#" != "2" ]]
      5 then
      6   echo "Usage: `basename $0` [option] filename"
      7   echo
      8   echo "Options: e - export file from anjuta"
      9   echo "         i - import file to anjuta"
     10   exit
     11 fi
     12 
     13 if [[ "$1" != "e" ]] && [[ "$1" != "i" ]]
     14 then
     15   echo "Wrong option argument."
     16   exit
     17 fi
     18 
     19 if [[ "$1" = "i" ]]
     20 then
     21   cat $2 > ~/Projects/foobar-cpp/src/main.cpp
     22 fi
     23 
     24 var=$2
     25 
     26 if [[ "$1" = "e" ]]
     27 then
     28   echo "e"
     29 fi
     30 
     31 exit

ERROR
ie-to-anjuta.sh: 11: [[: not found
ie-to-anjuta.sh: 17: [[: not found
ie-to-anjuta.sh: 22: [[: not found
ie-to-anjuta.sh: 29: [[: not found