[Xorp-hackers] Hi,all. Is this a bug or just a mistake config?

Aaron Shang aaronshang at gmail.com
Tue Dec 1 19:38:47 PST 2009


You may try 'tee' for such purpose, such as:

/bin/echo '' | tee -a /tmp/a.txt

or just use 'tee' without '-a' to override the file.


Good luck.



BTW, you can attach ascii files using proper mime type in file name,
so as to include them in most mail readers:
$ cp test.tp test.tp.txt



2009/11/30 cheng wan <wancheng82 at gmail.com>:
>
>> Thank you, Bruce.
>> The official document "rtrmgr.pdf"(Chapter 2.3.2) gave one example:
>> foo {
>> %set: program "/bin/echo -n ’$(@)' >> /tmp/file.txt";
>> }
>> What I wrote in test.tp was mostly like this.
>> If I did not use "save" after "commit", everything is OK.
>> What does "These command strings aren't guaranteed to be executed by a
>> shell" mean?
>> Does that mean Template Tree program Action can not support this?
>>
>> Best
>> Robin
>>
>>
>> 2009/11/29 Bruce Simpson <bms at incunabulum.net>
>>>
>>> Hi,
>>>
>>> You seem to be using shell redirection operators ('>>') inside a XORP
>>> template file.
>>>
>>> These command strings aren't guaranteed to be executed by a shell, you
>>> are probably better off using some other means of telling your external
>>> program(s) which files to use (e.g. command line arguments).
>>>
>>> cheers,
>>> BMS
>>


-- 
Aaron, with best regards



More information about the Xorp-hackers mailing list