User avatar
Lyn coweat verifiedlesbian @fugi@amazonawaws.com
2w
absolutely wild that there seems to be no single standard linux program that simply takes a filename as one argument and text to write to it as another, without needing to use shell features like io redirection, pipes or herestrings Oo

Edit: Yes I know I can spawn a shell if I don't have one (e.g. in a systemd service's ExecStartPre etc.), I know plenty of other workarounds I could use too. All I wanted to say is that it's weird that such a workaround
is needed.
2
0
7
0
User avatar
229 @Nero@chaos.social
2w
@fugi what would be the usecase for this? with having a shell, writing to files basically comes for free for any program...
1
0
0
0
User avatar
Lyn coweat verifiedlesbian @fugi@amazonawaws.com
2w
@Nero Anywhere you don't automatically have a shell, like in a systemd service's ExecStartPre for example
1
0
2
0
User avatar
Celeste_transbian flori_ava_star:~cursor_blinkingbadge-petting-encouraged badge-biting-allowed @star@amazonawaws.com
2w
@fugi @Nero but bash -c ...
1
0
3
0
User avatar
Lyn coweat verifiedlesbian @fugi@amazonawaws.com
2w
@star @Nero like I said, obviously I can do that, but it's ugly
1
0
4
0

User avatar
Celeste_transbian flori_ava_star:~cursor_blinkingbadge-petting-encouraged badge-biting-allowed @star@amazonawaws.com
2w
@fugi @Nero I didn't see where you said it
1
0
3
0
User avatar
Lyn coweat verifiedlesbian @fugi@amazonawaws.com
2w
2
0
2
0
User avatar
Celeste_transbian flori_ava_star:~cursor_blinkingbadge-petting-encouraged badge-biting-allowed @star@amazonawaws.com
2w
@fugi @Nero I also reaaaaly don't think it's thaaaaat ugly. You likely don't even need /bin/... because bash or at least sh are always in path. But that's a subjective measurement I guess
2
0
1
0
User avatar
Celeste_transbian flori_ava_star:~cursor_blinkingbadge-petting-encouraged badge-biting-allowed @star@amazonawaws.com
2w
@fugi @Nero chaotic evil /usr/bin/claude-code --prompt "write the following text to the file at ...: ..." --auto-accept (I don't know if any of these flags exist, I am just posting)
1
0
2
0
User avatar
Max @korenchkin@chaos.social
2w
Cognitohazard, LLMs, unix shell commands @star @fugi @Nero lawful evil: ln -sf /usr/bin/claude-code /bin/sh
0
0
1
0
User avatar
Lyn coweat verifiedlesbian @fugi@amazonawaws.com
2w
@star not necessarily with systemd services ^^
the /bin/ part is not what I find ugly tho, it's the need to call a shell and pass all that as an argument to it, possibly requiring escaping quotes and stuff, when it could simply be something like "write 1 /file". I just find it wild that no such program exists. You can only spawn a shell, or spawn some interpreter like python or perl, or abuse sed (ugly too), or similar workarounds.
0
0
2
0
User avatar
229 @Nero@chaos.social
2w
@fugi @star it a thing with shell, that it always feels some kind of dirty/ugly. but i think its a matter of "aquired taste". like with booze.
0
0
0
0