so, is it possible to redirect the output of a file?
touch ioredirect.txt
echo "this is a test" > ioredirect.txt
vim.tiny ioredirect.txt** -- looks good
echo < ioredirect.txt
?
On Thu, Aug 11, 2011 at 10:53 AM, nathan nolast <nathan1465@gmail.com> wrote:
nice, all great answers
i appreciate it.
On Thu, Aug 11, 2011 at 2:18 AM, Jordon Bedwell <jordon@envygeeks.com> wrote:
On Wed, August 10, 2011 10:18 pm, nathan nolast wrote:
> can someone please inform me how this works
>> filename.txt
> this emptys the file but i cant find what > is doing, what is >
It's called stdio redirection or some (well actually a lot of) people just
call it I/O redirection. *You can redirect stdin and you can redirect. *<<
< stdin stdout > >>, the proper way to truncate a file is actually ">
file.txt" or ":> file.txt" and nothing more, no echo, with an echo of any
kind you always end up with at least 1 byte written to the file which
defeats the purpose of what you are trying to do if you want to down and
dirty about it.
http://tldp.org/LDP/abs/html/io-redirection.html
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
--
Thank you for your time
~Nathan
nathan1465@gmail.com
Please consider the environment before printing this email.
This message contains confidential information and
is intended only for the individual named. If you are not the named addressee
you should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this e-mail by mistake
and delete this e-mail from your system.
--
Thank you for your time
~Nathan
nathan1465@gmail.com
Please consider the environment before printing this email.
This message contains confidential information and
is intended only for the individual named. If you are not the named addressee
you should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this e-mail by mistake
and delete this e-mail from your system.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users