jeudi 4 juin 2015

pasting correct if statement (indented with '\t') in terminal (bash) gives syntax error

I get syntax error and a prompt 'Display all 2733 possibilities? (y or n)' when I paste the following in terminal in ubuntu 14.04. The lines are indented with '\t' characters. No errors if I replace '\t' with space characters. Is the terminal treating '\t' specially and showing options, therefore? need help - What is the problem here?

if [ $x -eq 1 ]; then
    cat non-existent-file;
fi

Aucun commentaire:

Enregistrer un commentaire