Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch nano editor passing piped command

this is a curiosity. Can i start nano editor from bash, passing a piped command? this is my situation: I've a log file with dates formatted in tai64. For print my file i launch:

$> cat /var/log/qmail/current | tai64nlocal

that print what i want. but i want to view this in nano or another editor in one command. for example:

$> cat /var/log/qmail/current | tai64nlocal > nano

but this doesn't work. Any suggestion? Thanks in advance

like image 986
davymartu Avatar asked Sep 05 '13 15:09

davymartu


1 Answers

if you want to nano to open stdin use dash-notation (-):

echo "foo" | nano -

in your case this would translate to

cat /var/log/qmail/current | tai64nlocal | nano -
like image 55
umläute Avatar answered Sep 28 '22 23:09

umläute