Let's say we got a content of the following command in bash, which consists of several rows, and just one column:
tacmd listsystems | grep -i $i | awk '{print $1}'
This content is a list of offline machines you got on a server and you want to write it into the file e.g. offline.lst
, in order to remove offline entries on a server from that file.
How do I write this specific content into offline.lst
?