neil, to linux

atuin.sh, by @ellie, is a sqlite-based, sync-able, terminal history store.

This looks rather cool if you want to keep a common terminal history across multiple machines.

thelinuxcast, to linux
@thelinuxcast@fosstodon.org avatar

I built a movie launching script in -- see how I did it. - https://youtu.be/-tKf3uV2kTc

BigEatie, to programming
@BigEatie@fosstodon.org avatar

scripting is straightforward enough that I can edit existing scripts without actually knowing how to write the scripts myself. If I'm proficient in is there any point in learning bash scripting. Is there something that I can do in bash or that bash makes easier that makes it worth learning.

hazelweakly, to random
@hazelweakly@hachyderm.io avatar

Super useful CLI idea:

I want bash scripts, but with conveniences and lightweight dependencies that can be inlined.

Imagine a "direnv-like" standard library of functions, alongside the ability to fetch-if-not-installed certain binaries, and maybe even a super simple module system.

Then, you bake the script, and it becomes a single file bash script.

To be clear, I want to write it in bash, and have it turn into "bash that I can curl".

kkarhan,
@kkarhan@mstdn.social avatar

@hazelweakly I know and I really would love to see that.

Basically porting a lot of advantages from , and to ...

Pretty shure this would require either a derivative language [i.e. "enhanced bash" / "ebash"] or require some preprocessor approach like [] and []...

morenonatural,
@morenonatural@todon.nl avatar

@hazelweakly @jbminn how about ? I dunno if you have something that youd describe, but getting there should be easier woth zsh than with

basically because path resolution in the earlier makes sense. I remember several "pls source .direnv-or-somehting if it exists" plugins exist, but for use in interactive shell and they don't evaluate super directories (again, should be easier to implement in zsh)

itnewsbot, to linux
@itnewsbot@schleuss.online avatar

Linux Fu: Supercharge Bash History - Having a history of shell commands is a great idea. It is, of course, enormously h... - https://hackaday.com/2023/05/05/linux-fu-supercharge-bash-history/

babel, to random

I had to explain to someone, and remembered the awesome 100-line implementation which demonstrates everything. https://github.com/p8952/bocker

rml, to random
@rml@functional.cafe avatar

"I tried #SBCL, and something I noticed was that for any simple function, #lisp takes a moment to compile, which isn't acceptable for a #shell"

Is this really the case?? Doesn't sound right at all.

#Guile and #Chez both feel faster than #bash, for example.

https://www.youtube.com/watch?v=dCbTw9UOuS8

dimi, to linux
@dimi@techforgood.social avatar

For everyone using "if grep" in , you can use an equal-tilde operator to handle regex matching instead.

if [[ $x =~ regex ]]; then

Just don't put your regex in quotes and you'll be fine.

drosophiliac, to programming

Hey, I go by the penname DROSOPHILIAC—you call me Dros or Drossy if you want. I'm 24 and am .

I'm a busy student. I code in but intend on learning #R and .

I also do electronic in . I intend to finish my first album sometime this year. We'll see if I can throw some music up on the internet anytime soon.

Beyond that, I write and make for fun and self-expression. I'm and generally quite .

Thanks for reading.

vwbusguy, to programming
@vwbusguy@mastodon.online avatar

Due to various gaps in APIs, SDKs, CLIs, etc., I still have some significant cloud service lifecycle management that happens through or scripts that run on a cron (or whenever someone remembers to run them). Like 99% of stuff is automated via Terraform, Ansible, Jenkins, etc., but there is some severe jank around the edges of absolutely everything on the internet.

Freemind, to linux Spanish
@Freemind@mastodon.online avatar

Be very careful with , only know how to .

SimonJohnGreen, to programming

I have a couple of enviroment sensors attached to various boards dotted around the house.

I needed a way to collect the data, log it, analyse it, graph it and present it on a web page.

Written in these scripts collect the , log it to a file, then use to create the graphs.

then pulls the graphs to an .

https://simonjohngreen.endofinternet.net/data-collection-logging-plotting-serving-a-simple-guide-part-i/

egypt, to random
@egypt@mastodon.social avatar

Bash has a way to specify strings with escaped characters like so: $'\r\n' which gives a string containing carriage return and newline characters.

The read built-in can take a delimiter with the -d flag. Combining these lets you use a null character: read -d $'\0'

Useful in some of the same places you might use xargs(1).

find . -name ... -print0 | while read -d $'\0'; do ./foo "$REPLY"; done

qmacro, to random
@qmacro@hachyderm.io avatar

New post: Improving my interactive workflow with ijq, and .

I'm a big fan of ijq and how it allows me to explore data interactively with jq expressions. With a small script I have improved my workflow by being able to capture the jq expression from ijq and use it easily on the command line.

https://qmacro.org/blog/posts/2023/04/27/improving-my-interactive-jq-workflow-with-ijq-bash-and-tmux/

Share & enjoy!

schenklklopfer, to random German
@schenklklopfer@chaos.social avatar

In einer #Bash in #VSCode unter #Windows schon mal set -x gemacht und einfach nur Enter gedrückt?

Gruselig.

neil, to linux

If you use @bitwarden's package on with , and you find it doesn't work when the package updates, try this:

#!/bin/bash  
# Fix Bitwarden snap package GNOME desktop integration

BITWARDENFILE="/var/lib/snapd/desktop/applications/bitwarden_bitwarden.desktop"

NEWEXEC="Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/bitwarden_bitwarden.desktop /snap/bitwarden/current/bitwarden"

sudo sed -i "/^Exec/c\\$NEWEXEC" "$BITWARDENFILE"

dwarmstrong, to programming
@dwarmstrong@fosstodon.org avatar

Day 59 of - Continuing to code a "after_first_boot" setup script in for ,

dwarmstrong,
@dwarmstrong@fosstodon.org avatar

@johnbessa As I explore (glibc) in VMs, I wrote a script to quickly install Void with LUKS encryption + BTRFS filesystem.

Now I'm writing a second post-install script - this time in - to further configure the new system.

Part of my personal challenge to learn programming! 🙂

Here is what I have so far: https://gitlab.com/dwarmstrong/null-to-void

anderseknert, to programming
@anderseknert@hachyderm.io avatar

Rather than deciding on a scripting language that only some in the organization understands and enjoys — like — consider a more inclusive option, like , which no one understands or enjoys.

fell, (edited ) to programming
@fell@ma.fellr.net avatar
dwarmstrong, to random
@dwarmstrong@fosstodon.org avatar

Day 56 of - Writing a script to install with encryption + BTRFS.

jasonnab, to programming


Is there any tool to download public posts and retoots and reply toots of an inactive Mastodon account? I forgot to backup my posts before migrating, and I don't know a method that doesn't involve disabling inactivity on the account (and not sure what that will do).

itnewsbot, to linux
@itnewsbot@schleuss.online avatar

Before You sudo rm -rf /, Take Some Precautions - Maintaining or administering a computer system remotely is a common enough task th... - https://hackaday.com/2023/04/21/before-you-sudo-rm-rf-take-some-precautions/

mjgardner, (edited ) to programming
@mjgardner@social.sdf.org avatar

This is hilarious. A #Google engineer invented #zx to make command line scripting easier with #NodeJS, because at a certain point #shell scripts get too complicated and you need a Real #Programming Language.

https://github.com/google/zx/

This is exactly #Perl’s use case from thirty-six years ago. But the kids want #JavaScript everywhere and would rather it take more work to convert their ascended #Bash scripts to a vastly different syntax.

https://github.com/google/zx/issues/581#issuecomment-1516573139

#Unix #Linux #ProgrammingLanguages

mjgardner,
@mjgardner@social.sdf.org avatar

https://fuckgov.org/@h Oh, I don’t deny it’s useful. And you’ll never catch me saying it’s bad to stick with what you know if it gets the job done—that’s one reason I continue to use #Perl.

My main point was that it’s less work converting #Bash to Perl than to #JavaScript.

The “kids want JavaScript everywhere” was admittedly a little snark directed at the “continuous amnesia” of prior art (not unique to #JS developers but their sheer number means it’s really prevalent) as described here: https://www.ufried.com/blog/continuous_amnesia_issue/

mjgardner,
@mjgardner@social.sdf.org avatar

@AlgoCompSynth https://fuckgov.org/@h “Readable” implies what the reader already knows how to read.

Your reply is to a post where I specifically said the point was about converting from .

If you don’t know how to read a script you definitely don’t know how to convert it to another language. You’ll be doubly handicapped if the new language is nothing like the old.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • cubers
  • tacticalgear
  • InstantRegret
  • magazineikmin
  • everett
  • rosin
  • Youngstown
  • slotface
  • ngwrru68w68
  • osvaldo12
  • kavyap
  • mdbf
  • DreamBathrooms
  • JUstTest
  • khanakhh
  • cisconetworking
  • Durango
  • provamag3
  • thenastyranch
  • ethstaker
  • modclub
  • tester
  • normalnudes
  • megavids
  • GTA5RPClips
  • Leos
  • lostlight
  • All magazines