majestictechie@lemmy.fosshost.com to Linux@lemmy.mlEnglish · 2 months agoHow dare you use a text editor because it's easy to uselemmy.fosshost.comimagemessage-square327fedilinkarrow-up1840arrow-down158
arrow-up1782arrow-down1imageHow dare you use a text editor because it's easy to uselemmy.fosshost.commajestictechie@lemmy.fosshost.com to Linux@lemmy.mlEnglish · 2 months agomessage-square327fedilink
minus-squaredatelmd5sum@lemmy.worldlinkfedilinkarrow-up7·2 months agocat pipeing is safer though. foobar > file and your file is gone.
minus-squarewise_pancake@lemmy.calinkfedilinkarrow-up2·2 months agoYou can always alias > to < in your shell.
minus-squareTrail@lemmy.worldlinkfedilinkarrow-up2·2 months agoHuh does that actually work? Don’t have a system handy to try it out.
minus-squarelemmesay@discuss.tchncs.delinkfedilinkarrow-up4·2 months ago storage/documents/programs ro > echo puts "hello world" > main.rb storage/documents/programs ro via rb > ls c js main.rb python storage/documents/programs ro via rb > < main.rb grep hello puts hello world storage/documents/programs ro via rb >
minus-squareJackbyDev@programming.devlinkfedilinkEnglisharrow-up2·2 months agoI think so! I think it’s something like < file works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don’t remember lol.
cat pipeing is safer though.
foobar > file and your file is gone.
You can always alias
>
to<
in your shell.Get out!
<file foobar
Huh does that actually work? Don’t have a system handy to try it out.
storage/documents/programs ro > echo puts "hello world" > main.rb storage/documents/programs ro via rb > ls c js main.rb python storage/documents/programs ro via rb > < main.rb grep hello puts hello world storage/documents/programs ro via rb >
I think so! I think it’s something like
< file
works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don’t remember lol.