Re:4B If Statements
by ericbarrett on Thursday December 28, 2023 @05:30PM
(#38799546)
GNU yes will actually repeat any string—the default is of course "y". So it's very handy for scripting, and not really as single-purpose as you'd think.
[ Parent
| on HN ]
Re:4B If Statements
by throwitaway1123 on Thursday December 28, 2023 @05:58PM
(#38799808)
Yeah it's definitely useful. Still a bash one liner though:
function yes { while true; do echo "${1:-y}"; done }