Cannot read text from text file and store it in a variable using shell script
i tried using the tail command in my shell script and storing that value in a variable a but an error keeps coming . is there any other way to store the output of a command into a variable. the thing is i need a number from the file new.txt and use that number in my script
#!/bin/bash
a = `tail -1 new.txt|head -n 1`
echo $a
|