I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I'd do :> foo to do this (well, I use :>| foo because I have noclobber set, but...)
As for needing to output ls without colour, I think color=auto works for most colour-aware commands in that you get colours, but they're suppressed if the output's to a pipe. That should cover most cases?
The reason why I originally created that alias is because at some point, for whatever glitched reason, I couldn't force colors off and that was the only way I could force it off. Don't remember exactly what it was; it's been a few years and my memory has been slipping lately.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd do
:> foo
to do this (well, I use:>| foo
because I havenoclobber
set, but...)As for needing to output
ls
without colour, I thinkcolor=auto
works for most colour-aware commands in that you get colours, but they're suppressed if the output's to a pipe. That should cover most cases?The reason why I originally created that alias is because at some point, for whatever glitched reason, I couldn't force colors off and that was the only way I could force it off. Don't remember exactly what it was; it's been a few years and my memory has been slipping lately.