Bugs That Bite
Published in

Bugs That Bite

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

Teri Radichel

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

____________________________________________

Author:

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store