I have to do an alias called for example "longest" for this script:
data=""; len=0; line=""; while [[ $line != "quit" ]]; do read line; [[ $line != "quit" ]] && [[ ${#line} -gt len ]] && len=${#line} data=$line; done; echo $len; echo $data 1>2
Its job is simply reading words or phrases and counting the characters.
I put the script inside quotes like this:
alias longest="...script..."
but it doesn't work and I don't know why. Can anyone explain to me why? A possible solution?