dimanche 28 juin 2015

UNIX: Unexpected End of file

I have a problem where the editor reports no problems, but when I run it in a terminal, it reports: Unexpected end of file.

What I'm trying to do is get it so that when this script is run, it changes the permissions so that everyone can execute the file.

I'm scripting the file on a Windows Machine:

#!/bin/bash

file=~\scripts\chmxtextfile.txt

if [[  -e "$file"  ]];   
then {chmod ugo+x $file} 
elif [[  ! -e "$file"  ]];
then echo "File doesn't exist"
fi

Aucun commentaire:

Enregistrer un commentaire