4
rated 0 times
[
4]
[
0]
/ answers: 1 / hits: 14132
/ 2 Years ago, sat, may 21, 2022, 3:17:20
How do you use tail to get the last line outputted by a program. I've tried the following so far:
echo `cmd` >> stdin && tail -1 stdin
For instance:
henry@henry-pc:~$ echo "abc
123" >> stdin && tail -1 stdin
abc
123
More From » bash