I'm wondering if it's possible to "extract" the first 5 lines of a textfile to a single variable (not an array)
for example:
head -5 test.txt >$variable
(which of course doesn't work)
I'm trying to use zenity to display the first lines so I can confirm / cancel depending on the text displayed
zenity --question \
--text=$text
(other working solutions are of course appreciated...)
variable="$(...)"
). – AdminBee Aug 10 '20 at 10:03