gac() {
git add .
git commit -m "$1"
}
Эта функция есть в моем профиле bash, и при попытке найти файл возникает ошибка.
$ source ~/.bashrc
bash: /home/sahandz/.bashrc: line 176: syntax error near unexpected token `('
bash: /home/sahandz/.bashrc: line 176: `gac() {'
Я не могу понять, почему. У меня есть другая функция, которая выглядит так и не вызывает никаких ошибок:
abcToTestDir() {
folderName=${1%_*}
testFolderPath="$testfilespath$folderName"
abcFilePath="$abcpath$folderName/$1"
testFilePath="$testFolderPath/$1"
mkdir -p $testFolderPath
cp $abcFilePath $testFilePath
}
Что не так с моим определением функции?