I need to get the lenght of a filename obtained from a file in linux shell. This is my code:
#!/bin/bash
locate /var/log/orkaudio/ | grep ".wav" | grep -v left | grep -v right > ficherosOrkAudio.txt
while read filePath ; do
filePathLenght = ${#filePath}
echo $filePathLenght
done <ficherosOrkAudio.txt
But when i run the bash file, i get:
./procesoTest: line 6: filePathLenght: command not found
./procesoTest: line 6: filePathLenght: command not found
./procesoTest: line 6: filePathLenght: command not found
./procesoTest: line 6: filePathLenght: command not found
./procesoTest: line 6: filePathLenght: command not found
./procesoTest: line 6: filePathLenght: command not found
./procesoTest: line 6: filePathLenght: command not found
Please help me realize problem.