ambiguous redirect in bash
Trying to output the results of a process to a file
This is a very ambiguous error message. You’ll see this error message when you try to output the results of a line of code you’re running to a file. Likely what happened was that you set a variable to a file name and then misspelled the variable when you use it like this:
out="file.txtecho "Send this comment to a file" > $outz
Fix the variable name and it will work:
out="file.txtecho "Send this comment to a file" > $out
If you liked this story please clap and follow:
Medium: Teri Radichel or Email List: Teri Radichel
Twitter: @teriradichel or @2ndSightLab
Requests services via LinkedIn: Teri Radichel or IANS Research
© 2nd Sight Lab 2022
Cybersecurity for Executives in the Age of Cloud on Amazon
Need Cloud Security Training? 2nd Sight Lab Cloud Security Training
Is your cloud secure? Hire 2nd Sight Lab for a penetration test or security assessment.
Have a Cybersecurity or Cloud Security Question? Ask Teri Radichel by scheduling a call with IANS Research.
Cybersecurity & Cloud Security Resources by Teri Radichel: Cybersecurity and Cloud security classes, articles, white papers, presentations, and podcasts