Lugh@futurology.todayM to Futurology@futurology.todayEnglish · 4 days agoMicrosoft AI CEO: 'Most, if not all' white-collar tasks can be replaced by AI within 12-18 monthswww.businessinsider.comexternal-linkmessage-square61fedilinkarrow-up197
arrow-up197external-linkMicrosoft AI CEO: 'Most, if not all' white-collar tasks can be replaced by AI within 12-18 monthswww.businessinsider.comLugh@futurology.todayM to Futurology@futurology.todayEnglish · 4 days agomessage-square61fedilink
minus-squareoktoberpaard@piefed.sociallinkfedilinkEnglisharrow-up6·4 days agoI agree that comments like this are just hype. However, this is what Claude responded first try when I asked it your question verbatim: Fish doesn’t support the <<EOF heredoc syntax — that’s a Bash/POSIX feature. Here are your options in Fish: Use printf or echo: printf '%s\n' \ 'line 1' \ 'line 2' \ 'line 3' > notes.txt Use begin/end with a string: echo "line 1 line 2 line 3" > notes.txt Use string with multiline input: string collect -- "line 1 line 2 line 3" > notes.txt Or just call bash inline for a one-off heredoc: bash -c 'cat <<EOF > notes.txt line 1 line 2 line 3 EOF' The printf approach is generally the most idiomatic Fish way to do it.
I agree that comments like this are just hype. However, this is what Claude responded first try when I asked it your question verbatim:
Fish doesn’t support the <<EOF heredoc syntax — that’s a Bash/POSIX feature. Here are your options in Fish: Use printf or echo:
printf '%s\n' \ 'line 1' \ 'line 2' \ 'line 3' > notes.txtUse begin/end with a string:
echo "line 1 line 2 line 3" > notes.txtUse string with multiline input:
string collect -- "line 1 line 2 line 3" > notes.txtOr just call bash inline for a one-off heredoc:
bash -c 'cat <<EOF > notes.txt line 1 line 2 line 3 EOF'The printf approach is generally the most idiomatic Fish way to do it.