If I have a txt file with
test.txt
somelineoftext
and I want to set that line of text to variable in a script:
so
#!/bin/bash
var=''
becomes
#!/bin/bash
var='somelineoftext'
Im sure I use grep but I don't know what the command would be????
Is there a way of doing that?