I am trying to create a simple shell script that will print the following message on the screen: "Your kernel is: (kernel version)".
My script is:
Code:
#!/bin/bash
yks="Your kernel is: "
kernel=cat /home/usertest/file1
#this is the text file in which I have saved my kernel version
echo $yks $kernel
But it seems that I cannot assign the cat command to a variable. Any suggestions?