Posted on 07-21-2014 07:01 AM
I created a new policy and entered the following command into "Execute Command" under Files and Processes.
echo "test text goes here" >> /tmp/newpass
Sadly, when I look at /tmp/newpass, it exists, but is empty. Anyone able to explain this?
Posted on 07-21-2014 09:11 AM
I was able to avoid the problem by using
echo "test text goes here" | tee /tmp/newpass
Still not sure why the >> didn't work.
-t-
Posted on 07-21-2014 11:52 AM
You are almost correct.
1>filename # Redirect stdout to file "filename." 1>>filename # Redirect and append stdout to file "filename." 2>filename # Redirect stderr to file "filename." 2>>filename # Redirect and append stderr to file "filename." &>filename # Redirect both stdout and stderr to file "filename." # This operator is now functional, as of Bash 4, final release.
So in your case it would be:
Echo "test text goes here" 1>>/tmp/newpass