#Shell Scripting
Explore tagged Tumblr posts
nixcraft · 1 year ago
Text
A Bash Script to Read All Command Line Arguments into an Array Using mapfile Command: Simplify Argument Handling
11 notes · View notes
allylikes · 2 years ago
Text
I made a cute little startup notification greeter for my Linux system (but it should work anywhere you have access to a POSIX-compliant shell, the date command, and the notify-send command!) I have it included in my window manager's startup script, so it will run every time I log on.
Tumblr media
#!/bin/sh [ "$(date +%H)" -gt "11" ] && GREET="afternoon" || GREET="morning" notify-send "Welcome." "Good $GREET, $USER"
That first line is doing a few things. First, it is getting the current hour (in 24-hour time, so an integer between 0 and 23) with $(date +%H). Then the -gt checks if it is greater than 11 (NOT 12; our hour value starts at 0) . If the hour is greater than 11, it sets the variable GREET to "afternoon". If the hour is NOT greater than 11, it sets GREET to "morning".
The second line is a call to the notify-send command, a simple command-line program to send desktop notifications. We pass 2 arguments: The notification title (or "summary" as it is referred to in the documentation), and the body. Our title is simply "Welcome." In the body, we call 2 variables: the GREET variable we set in the first line, and the USER variable which stores your username.
(my setup: Dunst notification daemon, with the Catppuccin Mocha color scheme)
34 notes · View notes
dibelonious · 7 months ago
Text
WARP is an amazing AI Linux terminal. The mixing of shell script and natural language is simply mind blowing.
2 notes · View notes
Text
stop using chatgpt!!!! take a bronze pin and carve your questions onto an ox scapula, then toss it into the fire!!!! use the cracks to divine the gods answer!!!!
72K notes · View notes
alexturntable · 3 months ago
Text
shell_australia Check Mate!  Charles and Lewis are in the land Down Under, chatting about highlights, passionate fans, and Shell’s innovation partnership with @/scuderiaferrari
72 notes · View notes
logicpng · 4 months ago
Text
Tumblr media Tumblr media Tumblr media
this was meant to be a silly concept sketch that got mildly overproduced for the sake of putting some concepts on paper
it's still fun to make so i'll take it though
[ Description in ALT ]
77 notes · View notes
mirqmarq428 · 2 years ago
Text
Okay OK so
Powershell
is great if you want data types other than string. It does json natively, prints things in pretty tables, etc. It's a decent shell on Linux just for that.
On windows, it's comically overpowered. You can (and I have) write FULL GUI APPS in powershell. You can reach into the sticky soup that is WinDOS, pull at the spaghetti internals, and puppet its corpse like in Ratatouille. You can inline C# code. If your company pays for Office, you can straight up crack that shit open. It's literally insane.
81 notes · View notes
nixcraft · 2 years ago
Text
In this tutorial, you will learn how to utilize the ssh command batch mode and timeout option to verify ssh connectivity within a shell script.
Tumblr media
-> How to check for ssh connectivity in a shell script
12 notes · View notes
allylikes · 2 years ago
Text
Recently I discovered MPD (Music Player Daemon), a music player based on a server/client architecture.
The design allows it to be used with a variety of different clients, all at the same time. That means you can interface with the server through simple command-line commands (mpc), through a terminal user interface (ncmpcpp), through a graphical user interface (ario), or even a web interface (ympd).
Setting it up isn't too hard, and the example configuration file (usually found at /usr/share/doc/mpd/mpdconf.example) provides lots of information and documentation about the available options. One thing you should keep in mind is that MPD's systemd service will use the config file at /etc/mpd.conf. I don't use the systemd service, so I launch it with the command $ mpd ~/.config/mpd/mpd.conf.
Once you have your server set up, you need to make it scan your music directory. All clients should have this functionality, but the most simple way to do it is with the mpc client, running $ mpc update. You should only need to do this on the first startup of MPD, and whenever you make changes to your music directory. Confirm that your library has been loaded with $ mpc stats.
To integrate MPD into my workflow, I wanted to implement keybinds to control my media. I know it can be integrated into playerctl (with mpDris2), but I would like separate media keybinding for playerctl. With that in mind, I chose to make my MPD keybinding use the super key + the media keys. In order to do that, I made 3 scripts: mpd-playpause, mpd-volume, and mpd-next. I used DWM's config to bind the relevant keys to these scripts.
These scripts (along with explanations and screenshots) can be found at https://github.com/allylikesu/mpd-scripts.
In the future, I want to implement a little dmenu control panel for MPD , so watch out for that!
2 notes · View notes
kaiasky · 1 month ago
Text
stdout stderr was a mistake we needed 3 we needed stdout + stdlogs + stderr. everybody wants their shit to print 'configuration successful' or someshit + that means if I ever have to call ur script and I care what it outputs I gotta parse it bc I can't trust that u won't have loggers set up to spew nonsense at me
20 notes · View notes
ailurinae · 6 months ago
Text
Bash as a language has so many issues. But it is still a ton of fun.
Bash scripting is kind of fun actually
10 notes · View notes
wildstar25 · 3 months ago
Text
I ran into an Erenville RPer in game today who would give out animal facts if you asked and they did give Arsay a fact it was a very cute interaction but it did remind me of the opening of dawntrail when Wuk lamat asks how far they were from the shore, and upon seeing sea birds I knew Arsay would respond that the birds meant they were close to shore only for Erenville to pop up like a second later and said the very same thing. It was such a cute little moment for me.
22 notes · View notes
dennisboobs · 5 days ago
Text
Tumblr media
one day i'll post my fic and you can finally witness this monster of a playlist that fuels my insanity
#but for now. i write notes about electrical service box grounding (suffering)#im literally motivated to get Ahead with my courseload so i can write + draw im going insane not being able to do anything creatively#it was a mistake signing on for 5 self-driven courses in a semester btw. just in case anyone was wondering.#if youre considering it that's the devil speaking#or your business partner who wants you to be able to work sooner i suppose#anyway the dennis playlist i have posted in the past is a decoy this is the real one#i refuse to have overlap and i prioritize this one lol#i have a super secret charden playlist that i can't have overlap with too but thats not important.#i dont think anybody will see That one....... its for me........#north dakota fic playlist is crazy because i'm like holy shit this song is perfect what the hell (wrote the fic)#my brain and music have a symbiotic relationship in that i am inspired by songs and then the direction the fic takes also opens up new musi#considering a minor rewrite bc i like the picture painted by a song if i match up with lyrics#also lowkey highkey how vicky works as well i iron out details while sorting thru music#it usually helps to inspire me and broaden my ambitions a little more than i would normally go for#i think north dakota fic has spun into this big web rather than this very focused thesis Because i've got songs about multiple relationship#ie. thinking about mandy and dennis' arrangement. boundaries and feelings (not romantic or sexual. something else.)#it's precisely because of their history that dennis is distant and gives her more space than is necessary in every possible way#it's not out of respect for her or this odd sort of truce they have for their kid's sake#it's like. if i let you any closer i'm going to run. but god do i wish i could. when you Already know so much. it'd be so easy.#dennis enjoys domesticity. so he can't enjoy anything about being here. he's punishing himself and he's here for his son Only#sleeping on the couch or in a hotel instead of in the bedroom because he could get comfortable sleeping with mandy#they cant afford a bigger apartment and she's fine with it. he knows this. but Fuck No.#dennis' weakness... sleeping With someone. (no i will Never stop thinking about maureen spooning him in the 6x02 script. fucking lorddd)#he craves casual intimacy with her in the same way he craves it with mac. and he could. but she knows him. (he could Let her know him.)#and she sees this in him and Offers freely. offers him help. offers the bare minimum. and he can't have that. it's compassion. it's pity.#it's her seeing someone who is desperate to break open the shell that encases him but knowing it'd do horrible things if she did it for him#it's not even a matter of pride. it's about relinquishing control. he's So out of his element and has no hope of finding a foothold here#this is a charden fic btw. this is a charden fic where mandy is his partner. in this bizarre queerplatonic lavender marriage ass way#she's literally just his friend. dennis doesn't have any of those.#i thoroughly enjoy like. the contrast of her to mac and charlie and also the simple fact that dennis is insane
12 notes · View notes
papayafiles · 1 year ago
Text
saw the clip of landoscar touching hands and IMMEDIATELY hopped onto tumblr.com. i know the girls are losing their minds over this. thank you hilton 🙏🏼
92 notes · View notes
ailurinae · 1 year ago
Text
Ok, that is working much better now. Now I just need to write resume logic so I can download over multiple sessions. Cause the full episodes are over 100 MB and nearly 200 just of them, plus all the others.
Tumblr media
Time to download
@mcb3k
7 notes · View notes
lysaisland · 6 months ago
Text
𝐲𝐨𝐮’𝐯𝐞 𝐠𝐨𝐭 𝐦𝐚𝐢𝐥ᝰ.ᐟ
Tumblr media Tumblr media
𝐥𝐲𝐬𝐚 𝐢𝐬𝐥𝐚𝐧𝐝 𝐩𝐨𝐬𝐭𝐚𝐥 𝐬𝐞𝐫𝐯𝐢𝐜𝐞. 𝐞𝐬𝐭𝐚𝐛𝐥𝐢𝐬𝐡𝐞𝐝 𝐢𝐧 ’𝟎𝟕 𝐟𝐨𝐫 𝟏𝟕 𝐲𝐞𝐚𝐫𝐬 ❥
𝐚𝐥𝐥 𝐥𝐞𝐭𝐭𝐞𝐫𝐬 𝐚𝐧𝐝 𝐩𝐚𝐫𝐜𝐞𝐥𝐬 𝐰𝐞𝐥𝐜𝐨𝐦𝐞. 𝐩𝐥𝐞𝐚𝐬𝐞 𝐜𝐡𝐞𝐜𝐤 𝐭𝐡𝐞 𝐫𝐮𝐥𝐞𝐬 & 𝐫𝐞𝐠𝐮𝐥𝐚𝐭𝐢𝐨𝐧𝐬 𝐛𝐞𝐟𝐨𝐫𝐞 𝐬𝐡𝐢𝐩𝐩𝐢𝐧𝐠. ₊˚⊹ᰔ
Tumblr media
ao3: headingstraightforthefl00r
all writing is tagged #seafloor script ❧
tag definitions!!
#sunlight zone 𓆉 - general reblogs
#twilight zone༄ - ask box
#midnight zone ⚠︎︎ - me yip yapping
#pearls ❥ - recs/fics
#jellies🪼 - mutuals
#seastars ☆ - anons
#shells 🐚 - self reblogs/tag games
8 notes · View notes