yuliyan, to Bash
@yuliyan@nahe.social avatar

Masters of the terminal, which magic spell do I have to type in order to batch-remove the last 12 characters on all files?

Before:
SL370034.JPG.d1709304955

After:
SL370034.JPG

The ".dxxxxxxxxxx" part always consists of 12 characters where "." and "d" are character 1 and 2 followed by ten single digits.

bryan, to linux

I wish you could create aliases that were specific to a directory. Like a little bash aliases file that stayed and only worked in one directory.

falken,
@falken@qoto.org avatar

@bryan you could probably source ./.alias from $PROMPT_COMMAND

#bash #Linux #geek

5am, to LLMs
@5am@fosstodon.org avatar

I've been playing around with locally hosted using the tool. I've mostly been using models like mistral and dolphin-coder for assistance with textual ideas and issues. More recently I've been using the llava visual model via some simple , looping through images and creating description files. I can then grep those files for key words and note the associated filenames. Powerful stuff!

Tealk, to mastodon
@Tealk@rollenspiel.social avatar

Does anyone have any ideas on how to solve the problem?

https://codeberg.org/RollenspielMonster/simple-toot/issues/1

#mastodon #code #mastodonAPI #bash

santiago, to random
@santiago@masto.lema.org avatar

Also a bit lost regarding some path issues on . To use my usual scripts, I installed zsh + ohmyzsh andI symlinked
~/config/settings/.zshrc
to ~/.zshrc

Everything seems to work but python stuff only works properly in bash.

In zsh pip says:
/bin/python3.10: can't open file '/boot/home/pip'

(the last thing being any path I am currently in). PATH is the same so it must be some Python env variable ?

santiago,
@santiago@masto.lema.org avatar

Well.. this fixes it for pip …but not for packages installed by it (for example compiledb).

They are installed in :
/packages/python3.10-3.10.13-3/.self/non-packaged/bin

So I add can this path (which will inevitably change) to my .zshrc but why the hell doest it works with bash without anything in PATH or any other env variable ?

gnulinux, to Bash German
@gnulinux@social.anoxinon.de avatar

Programme über die Kommandozeile installieren

Zur Installation von neuen Programmen unter Linux stehen unterschiedliche Möglichkeiten zur Verfügung. Ich zeige euch in diesem Video am Beispiel von LibreOffice, wie ihr neue Anwendungen installieren könnt.

https://gnulinux.ch/programme-über-die-kommandozeile-installieren

syntaxseed, to Bash
@syntaxseed@phpc.social avatar

Wrote a script to use WP-CLI to dump the database, then to sync the files to Dropbox.

It pings HealthChecks.io to monitor progress & success/fail.

That was finally working well. 👍

Then calling it from a revealed the need to use full paths to commands like & WP-CLI. Took a bit to find (force) the logging of the cron to see what was wrong.

Still unclear why some commands (curl, etc) work fine.

Anyway... this is coming along!

fsf, to Bash
@fsf@hostux.social avatar

GNU Bash is a wonderful tool that many use every day, it executes commands typed into the terminal and is also a scripting language. The FSF tech team has a healthy drive to master their craft, and so, toward this end, they recently published an FSF Tech Team Bash Style Guide. Check it out at https://u.fsf.org/41y and read more about the tech team's recent work: https://u.fsf.org/41z

Tealk, to random German
@Tealk@rollenspiel.social avatar

ich habe das https://codeberg.org/RollenspielMonster/rollenspiel.social/src/branch/master/simple-toot gerade mal ein wenig erweitert, jetzt prüft es automatisch die neusten User und postet entsprechend den Text. Morgen, ja morgen ist erst nach dem Schlafen, werde ich das mal auf codeberg hochladen.

Tealk,
@Tealk@rollenspiel.social avatar

Anyone have an idea how i can run the request_authorization on the server without having to use a browser?
https://codeberg.org/RollenspielMonster/simple-toot/src/branch/master/toot.sh#L47

#bash #mastodon #script

skinnylatte, to Help
@skinnylatte@hachyderm.io avatar

if i have a folder of .md text files that all have a date in this format: date: "2003-01-26T06:24:10Z"

in the front matter

but they are on different lines

and i want to delete the quotes from all of the files at once

what's my best approach?

(i don't know how to write regex properly)

i use sublime text, and vim, if it helps

#Help #cli #bash

fsf, to Bash
@fsf@hostux.social avatar

GNU Bash is a wonderful tool that many use every day, it executes commands typed into the terminal and is also a scripting language. The FSF tech team has a healthy drive to master their craft, and so, toward this end, they recently published an FSF Tech Team Bash Style Guide. Check it out at https://u.fsf.org/41y and read more about the tech team's recent work: https://u.fsf.org/41z

gvwilson, to random
@gvwilson@mastodon.social avatar

Should I teach bash, fish, or Nushell to data scientists who want to go beyond the basics of shell scripting? There seems to be a clear spectrum from "ubiquitous but m'gawd" to "this is the future but m'gawd in a different way".

dpprdan,

@gvwilson teach'em good #bash basics because it's ubiquitous and encourage them to use their language of choice (#Python, #RStats, #Julia) for the more complex stuff.
bash basics = including things to setup more advanced Docker images, see e.g. https://github.com/rocker-org/rocker-versioned2/tree/master/scripts

bobthomson70, to Kubernetes
@bobthomson70@mastodon.social avatar

I'm immediately available for remote cloud devops b2b contract work, live in France with the right to work in France and the UK.

I am flexible on pay rate and on days per week, 3 days/week is OK with me.

From Linux sysadmin more than dev and years of GCP and AWS public cloud, with #docker and #kubernetes #gke #terraform #ansible #python #bash

Boosts welcome!

https://www.linkedin.com/in/bobthomson/

#fedihired #devops #devopsjobs #gcp #jobs #contract #freelance #linux #work #remotejobs #remote #cloud

jaandrle, to programming
@jaandrle@fosstodon.org avatar

Almost there, just final testing and adjustments.
And 🎉 nodejsscript@v1.0.0 🕊️ ready to go out into the world.

You can already browse the new documentation, tutorials and demos
https://github.com/jaandrle/nodejsscript/tree/dev-v1

Changes since version 0.9.x see PR
https://github.com/jaandrle/nodejsscript/pull/32

#nodeJS #nodeJsScript #JavaScript #scripting #bash

5am, to Blog
@5am@fosstodon.org avatar

Some tasks take too long for us to want to wait around for them to finish, like when you want to power down your computer and go to bed. So schedule a shutdown...

https://www.samhowell.uk/snippets/scheduled-shutdown/

#code #snippet #post #blog #linux #bash

arraybolt3, to Bash
@arraybolt3@theres.life avatar

Need help ASAP with finding a text editor for Bash.

So far all of the following text editors are unable to properly syntax highlight Bash herestrings:

  • Vim
  • Neovim
  • Nano
  • Kate
  • IntelliJ IDEA
  • Visual Studio Code

I'm at a loss. Even Vim isn't up to the task. I don't have the time or brainpower right now to learn Emacs. If anyone knows a text editor that can highlight Bash herestrings right, please ping me!

davidrfeinberg, to linux

Today was the day I had too many files for rm * and had to find . -maxdepth 1 -type f -exec rm {} +

fsf, to Bash
@fsf@hostux.social avatar

Did you know that the FSF tech team published 133 web pages of their sysadmin documentation? Check it out at https://u.fsf.org/423 and read more about the tech team's recent work: https://u.fsf.org/41z #GNUBash #Bash #Manuals #LearnLibre

wick3dr0se, to linux

I wrote a matrix digital rain implementation in under 50 lines of pure Bash.. I chose Bash due to it being widely installed and extremely portable. With modern systems this shouldn't cause any noticable performance changes and seems more than efficent so far

Looking for feedback, contributions or whatever helps 😆. If it interest you at all, let me know what you think about it!

https://github.com/wick3dr0se/matrix

Matrix digital rain

dewomser, to linux German
@dewomser@social.tchncs.de avatar

#Linux #Bash
#Git zwingt zum Commit.
Wenn man gerade gar keine Ahnung hat wie man seine Zeit totschlagen soll … Hier kommt Autocommit ein 1-Liner.

echo "Autocommit" >> README.md && git add "README.md" && git commit -m "$(w3m -dump https://whatthecommit.com | head -n 1)"

Vorsicht ! README.md wird tatsächlich geändert

anderseknert, to Bash
@anderseknert@hachyderm.io avatar

The only time I reach for scripts these days is when I need to call a few external commands in sequence, often with a few pipes in between them. IMHO there aren’t really that many other use cases left where some more competent scripting language isn’t a better choice. OTOH, why is that (evidently very common) use case still such a chore to do in basically any other language?

scy, to linux
@scy@chaos.social avatar

Nice trick for retrieving the current cursor position in bash:

IFS=';' read -sdR -p $'\E6n' row col && echo "row ${row#*[} column $col"

https://unix.stackexchange.com/a/183121

This is not POSIX-compatible though because of the flags in read.

I've used this to add an empty line in front of all of my shell prompts, except when on the top of the screen (i.e. in a new shell).

https://codeberg.org/scy/dotfiles/commit/f18000298473f78540723224e8f73971e26996ac

[

kandid, to random
@kandid@chaos.social avatar

I am currently trying to extract the dominant colors from photos. Later i want to create color palettes with 4 to 16 different colors. Color Quantization is not accurate. It can create interesting contrasts in false colors.

#imageMagick

Reduced to 4 colors. CMY color space for calculating the 'color distances'.
Reduced to 12 colors. HSB color space for calculating the 'color distances'.
16 colors. XYZ color space for calculating the 'color distances'.

kandid,
@kandid@chaos.social avatar

#!/bin/bash
export imagename=IMG_4758.HEIC
for quant in 2 4 8 12 16; do
echo number of colors $quant;
for S in RGB CMY sRGB GRAY \
XYZ LAB LUV \
HSL HSB HWB \
YIQ YUV OHTA ; do \
convert $imagename -quantize $S +dither -colors $quant \
-fill black -gravity SouthWest -annotate +2+2 $S \
/dev/shm/quant-$(basename "$imagename" ".HEIC")-$S-$quant.gif; \
done
done

#imageMagick #bash

hrbrmstr, to Bash
@hrbrmstr@mastodon.social avatar

A larger Observable Framework demo is on the way (prbly publish it tonight) with #RStats and #Bash data loaders and alot of #DuckDB data wrangling.

This is super addictive.

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