Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
You can use Vim in Ex modethe POSIX tool ex:
ex
ex -s -c '1i|task goes here' -c x todo.txt
ex a.txt <<eof 1 insert Sunday . xit eof
1 select first line
1
i insert
i
x save and close
x
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html
You can use Vim in Ex mode:
You can use the POSIX tool ex:
ex -scs -c '1i|task goes here' -cxc x todo.txt
ex -sc '1i|task goes here' -cx todo.txt
ex -s -csc '1i|task goes here' -c xcx alfatodo.txt
ex -s -c '1i|task goes here' -c x alfa.txt