Example, I want to extract the first four character from serial and store it into version.
output in the terminal:
Just to show you guys i havent been lazy...
echo $serial> serial.txt
version= cut -c1-4 serial.txt
but this code saves the value into a text file. I want a code that does not save into any file whatsoever. Help? Thanks.