this post was submitted on 16 Jul 2023
152 points (96.3% liked)

linuxmasterrace

518 readers
1 users here now

A community for Linux enthusiasts.

May your htop stats be low and your beard grow long

Welcome to [email protected] former r/linuxmasterrace members and existing Lemmyverse citizens: Feel free to join the newly created [email protected] community.

Let’s make the full transition to the decentralized Fediverse!

founded 1 year ago
MODERATORS
 

I’m moving my posts from Reddit to Lemmy before delete them.

This post is from 2020-09-03.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 11 months ago (1 children)

I have to switch to bash first, and wonder days later, why I can't find it (obviously) in my fish history.

[–] Thaurin 6 points 11 months ago* (last edited 11 months ago) (2 children)

I mean, doesn’t the script have a hash bang pointing to the bash interpreter?

#!/usr/bin/bash

Or you can just run it like:

bash script.sh
[–] [email protected] 5 points 11 months ago (1 children)

#!/usr/bin/env bash for compability. 😉

For example on my system bash is in /bin.

[–] Thaurin 5 points 11 months ago

Right, of course. I already do that with Python scripts, but with bash old habits die hard, I guess. :)

[–] [email protected] 2 points 11 months ago (1 children)

I know, well the lazyness is strong in me. Copy and paste.

[–] Thaurin 5 points 11 months ago* (last edited 11 months ago)

Huh. It’s the first thing I write in any script. It actually saves me time. What annoys me is a script that doesn’t have a hash bang. :)