I am trying to create a simple bash script to read user input and use this input as a variable within my script.
It currently looks like this :
echo "Please specify file:"
read FILE
What I want it to do is to check the $FILE input and reject it if it is too long, I have tried a couple of if commands but cannot find the test to check the length of the input.
Please can someone help?
Thanks
readalready, instead of first reading the data in and then checking the length after the fact.PATH=somethingand then wonder why your script is broken.