#unixshell

R.L. Dane :Debian: :OpenBSD: 🍵 :MiraLovesYou:rl_dane@polymaths.social
2025-04-16

I've probably tooted about this before, but I don't know why this isn't standard.

It's just so obvious, at least to me. ;)

~ $ type mcd
mcd is a function
mcd () 
{ 
    [[ -n $1 ]] && mkdir "$1" && cd "$1"
}

#shell #UnixShell #ShellScripting #sh #bash #ksh #mksh

R.L. Dane :Debian: :OpenBSD: 🍵 :MiraLovesYou:rl_dane@polymaths.social
2025-04-10

Should've made this a long time ago:

function ciglob {
    #case-insensitive glob generator
    echo "$*" |while read -N1 c; do
        case "$c" in
            [a-zA-Z])   echo -n "[${c^^}${c,,}]";;
            *)          echo -n "$c"
        esac
    done
}
~ $ ciglob "Hello, world!"
[Hh][Ee][Ll][Ll][Oo], [Ww][Oo][Rr][Ll][Dd]!
~ $ ls -ld $(ciglob documents)
drwxr-xr-x 52 ~~~ ~~~ 20,480 Apr 10 11:45 Documents

(Not the most useful example, but I did have a use case in mind when I wrote it ;)

P.S. (This is a valid way to close a parenthesis. Fight me ;)

#bash #ksh #sh #shell #UnixShell #POSIX #PosixShell #ShellScripting

ZB MEDZBMED
2025-04-10

🛠️ Curious how coding can support your research?
Join our Software Carpentry Workshop for absolute beginners – no experience needed, just curiosity and motivation!

📅 May 12–13, 2025, 09:00–16:00
📍 ZB MED, Cologne
👩‍💻 Hands-on sessions on:

for version control
programming

👩‍🏫 With @RabeaMue, Silvia Di Giorgio & Justine Vandendorpe
🔗 Register: zbmed.github.io/2025-05-12-Sof

Hintergrund: Foto von einer nicht erkennbaren Person mit Laptop, bei dem die Rückseite mit zahlreichen Aufklebern versehen ist, unter anderem The Carpentries, WikiCite, Open Science Radio.
2025-01-19

@jeeynet Salut, merci pour l'idée, je ne savais pas que c'était possible ! Concernant le script proposé, ce test est bizarre  :

if [ "${1}" ]

Si "${1}" venait à coïncider avec un opérateur de test(1) , vous auriez des surprises. Je suggère ceci à la place :

if [[ $# -gt 0 ]]

ou bien

if [[ -n "$1" ]]

Notes :

  • on peut se permettre [[ … ]] car le script utilise Bash;

  • vous pouvez enlever les " autour de $1 dans cet exemple mais attention, c'est un cas bien particulier dû au fait que [[ … ]] ne fait pas de “word splitting” sur l'expression fournie).

#Bash #shell #UnixShell

ZB MEDZBMED
2024-11-29

Invitation: Next Library Carpentry Workshop takes place online on January 20 to 24 together with . Information and registration: zbmed.github.io/2025-01-20-LC_

@thecarpentries

2024-10-31

In a #bash alias:

do something
printf "[ctrl-v] [up-arrow] [ctrl-v] [up-arrow] [ctrl-v] [up-arrow]"
echo something

Whoa, that actually worked?!?

I just got the most retro #Commodore64 feeling from bash of all things. XD

#Unix #Shell #UnixShell #sh

Sampo Rapelisampo@hachyderm.io
2024-09-11

My master's thesis "Understanding the role of Unix shell in software development and developer experience" is now available online!

Explore how developers use the shell, their emotions towards it, and its impact on developer experience.

#unixshell #developerexperience #softwaredevelopment

urn.fi/URN:NBN:fi:aalto-202408

Z3r0 ~ :t_blink:z3r0@maverick-hq.org
2024-07-18
$ cat > file <<EOF
your file
content goes
here
EOF

Más de 10 años viviendo es esto y aún se me olvida como escribir ficheros en Unix sin recurrir a editores de texto ¬¬

#Unix #UnixShell #Linux

Rabea MüllerRabeaMue
2023-11-09

🚀 Neues Video ist live! 🐚 Entdecke die mit meinem interaktiven Screencast. Von der Installation bis zum Shell-Skript – alles dabei! 🌟 Die Lesson online zum Mitmachen💡💻 youtu.be/L3JRQC_tZ4E?si=lZlkHW

2023-08-22

@witewulf

Don't tell anyone, but if one escapes the ? metacharacter and *does* pass -? to my tools, it actually *is* a shorthand for --help.

#nosh #UnixShell

A black on white terminal emulator showing a coloured Z shell prompt with the "poweroff -\?" command and the help text output that results from it, listing various options to that command.
2023-07-14

"Master The Command Line With Useful Bash Aliases In Linux And Unix" says the headline.

Not much use to me.

I mainly use the Z and Korn shells, nowadays; with the occasional Watanabe.

#UnixShell

2023-06-10

@Migueldeicaza @mholt @film_girl

I should have kept track of whoever it was commenting the other week about how many machine instructions and conversions to and from machine-readable form it takes to increment a variable by 1.

_math() {
_m_opts="$@"
printf "%s" "$(($_m_opts))"
}

...

_request_retry_times=$(_math "$_request_retry_times" + 1)

#UnixShell #ACME

2023-05-07

@zigg

hier(7) on #FreeBSD et al. suggests /usr/local/libexec/${YOURAPP} .

The logical extension to the XDG Base Directory Specification would likewise be ${HOME}/.local/libexec .

Of course the . command follows $path , which won't include either of those.

#UnixShell

2023-03-26

@Silversnapples @philheppenstall @Swebb63

I understand what Phil was saying, and this is exactly why I have the @JdeBP account.

For the benefit of MastodonApp.UK I can offer this translation from the jargon of Hippie-Unix:

Phil was clearly stoned in the 1990s.

'Peace and Love and vi key bindings, baby! "set -o emacs" is just what The Man wants you to type, man!"

(-:

#vi #HPUX #HippieCulture #Unix #UnixShell

2023-02-27

Today I embraced my scatter-brained behaviour and added `alias :e="vim";` to my shell config. #vim #unixshell

2023-01-02

@jamesbeston Whatever happened to just plain 'cat birthday.txt'? (-:

#UnixShell #Birthday

This morning's #LibraryCarpentry workshop is about #UNIXShell I am grepping hard...

Dr. Brian Callahanbcallah@bsd.network
2021-10-10

A wild #blog post appears!

I do some benchmarking of #oksh with nine C compilers on #OpenBSD. Nothing conclusive is discovered, but it is nonetheless a very fun journey.

briancallahan.net/blog/2021101

#Unix #Linux #FreeBSD #NetBSD #DragonFlyBSD #BSD #C #compile #compiler #compilers #shell #unixshell #kornshell #ksh

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst