Help with quotes and variables
Hi all, I am new to bash. I have a problem to which I haven't found a solution yet. I am starting to learn right now, so forgive me if my knowledge of bash isn't the best at all.
What I want to achieve is this output:
command $d
Where "command" is a command and $d is a variable. The variable d is based on another variable, called a.
It's something like this: d="/home/name/$a".
The problem is that variable a contains single quotes, like this: a='name of the file'
So, as you can guess the idea is to launch a command with the path of the file. However, the single quotes make it very difficult because when under the double quotes ("") are interpreted differently. How can I overcome this problem?
https://redd.it/1bqlxcj
@r_bash
Hi all, I am new to bash. I have a problem to which I haven't found a solution yet. I am starting to learn right now, so forgive me if my knowledge of bash isn't the best at all.
What I want to achieve is this output:
command $d
Where "command" is a command and $d is a variable. The variable d is based on another variable, called a.
It's something like this: d="/home/name/$a".
The problem is that variable a contains single quotes, like this: a='name of the file'
So, as you can guess the idea is to launch a command with the path of the file. However, the single quotes make it very difficult because when under the double quotes ("") are interpreted differently. How can I overcome this problem?
https://redd.it/1bqlxcj
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
So what is your bash coding environment?
It's a quiet Saturday on the subreddit, so I was curious.
My setup is:
Neovim → conquer of completion (coc.nvim) → coc-sh Current version 1.2.2
I do want to learn lua to set up those nvim language server protocol to skip coc. Just not that good on learning new things.
I do not have any other bash related plugins. Ok, I use
My
So I usually have the code in my right pane and the execution of the code with bash -x on the left, to see where I messed up.
Any workflow, cool plugins you might want to share?
https://redd.it/1brm1iy
@r_bash
It's a quiet Saturday on the subreddit, so I was curious.
My setup is:
Neovim → conquer of completion (coc.nvim) → coc-sh Current version 1.2.2
I do want to learn lua to set up those nvim language server protocol to skip coc. Just not that good on learning new things.
I do not have any other bash related plugins. Ok, I use
nerdtree to navigate sourced files, but I don't think that counts.My
PS4='•\[\e[1;33m\] ${BASH_SOURCE[0]##*/} ${LINENO}\[\e[m\] 'So I usually have the code in my right pane and the execution of the code with bash -x on the left, to see where I messed up.
Any workflow, cool plugins you might want to share?
https://redd.it/1brm1iy
@r_bash
GitHub
GitHub - neoclide/coc.nvim: Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers. - neoclide/coc.nvim
Building Signal for RaspberryPi. Look over the start of this noscript?
Using THIS blog post as a start I put this together. This will build but some things are hard coded and Id like to "detect" more. Like pulling a "stable" branch for Signal or always installing the latest nvm. I'm also struggling to use sed correctly to edit the packages.json file to add the "AppImage" part.
Any help is welcome. Hope theres a few folks out there that want this.
​
​
#!/bin/bash
## This noscript based on Andrea Fortunas blog post here: https://andreafortuna.org/2019/03/27/how-to-build-signal-desktop-on-linux/
## NVH Homepage: https://github.com/nvm-sh/nvm
## Signal-Desktop releases: https://github.com/signalapp/Signal-Desktop/releases
sudo apt install build-essential -y
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.7/install.sh | bash
git clone https://github.com/signalapp/Signal-Desktop.git --branch v7.4.0-beta.2 .local/share/Signal-Desktop ; exit
####EXIT TERMINAL HERE (i think to reset bash enviornment)
cd ~/.local/share/Signal-Desktop/
#sed -i 's/original/new/g' package.json
nvm use ; nvm install 20.9.0 ; npm install --global yarn ; yarn install --frozen-lockfile ; yarn generate ; yarn build-release
mkdir ~/.local/share/applications
cat > ~/.local/share/applications/signal-desktop.desktop <<EOF
Desktop Entry
Name=Signal
Exec=env LANGUAGE=tlh ~/.local/share/Signal-Desktop/release/linux-arm64-unpacked/signal-desktop --no-sandbox %U
Terminal=false
Type=Application
Icon=signal-desktop
StartupWMClass=Signal
Comment=Private messaging from your desktop
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
Categories=Network;InstantMessaging;Chat;
EOF
##REMOVAL
#rm -R ~/.local/share/applications/signal-desktop.desktop ~/.local/share/Signal-Desktop ~/.nvm ##.config/Signal/
​
Thanx
https://redd.it/1bru7yk
@r_bash
Using THIS blog post as a start I put this together. This will build but some things are hard coded and Id like to "detect" more. Like pulling a "stable" branch for Signal or always installing the latest nvm. I'm also struggling to use sed correctly to edit the packages.json file to add the "AppImage" part.
Any help is welcome. Hope theres a few folks out there that want this.
​
​
#!/bin/bash
## This noscript based on Andrea Fortunas blog post here: https://andreafortuna.org/2019/03/27/how-to-build-signal-desktop-on-linux/
## NVH Homepage: https://github.com/nvm-sh/nvm
## Signal-Desktop releases: https://github.com/signalapp/Signal-Desktop/releases
sudo apt install build-essential -y
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.7/install.sh | bash
git clone https://github.com/signalapp/Signal-Desktop.git --branch v7.4.0-beta.2 .local/share/Signal-Desktop ; exit
####EXIT TERMINAL HERE (i think to reset bash enviornment)
cd ~/.local/share/Signal-Desktop/
#sed -i 's/original/new/g' package.json
nvm use ; nvm install 20.9.0 ; npm install --global yarn ; yarn install --frozen-lockfile ; yarn generate ; yarn build-release
mkdir ~/.local/share/applications
cat > ~/.local/share/applications/signal-desktop.desktop <<EOF
Desktop Entry
Name=Signal
Exec=env LANGUAGE=tlh ~/.local/share/Signal-Desktop/release/linux-arm64-unpacked/signal-desktop --no-sandbox %U
Terminal=false
Type=Application
Icon=signal-desktop
StartupWMClass=Signal
Comment=Private messaging from your desktop
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
Categories=Network;InstantMessaging;Chat;
EOF
##REMOVAL
#rm -R ~/.local/share/applications/signal-desktop.desktop ~/.local/share/Signal-Desktop ~/.nvm ##.config/Signal/
​
Thanx
https://redd.it/1bru7yk
@r_bash
Andrea Fortuna
How to build Signal Desktop on Linux
Today let's try to make your own Linux build of Signal Desktop, in .deb and .AppImage format. Signal is a mobile app developed by Open Whisper Systems. The app provides instant messaging, voice and video calling, and all communications are end-to-end encrypted.…
Printf -v var
Works
printf -v var “%s” “hi”
echo “$var”
Works
printf “%s” “hi” | tee somefile
cat somefile
Why this one doesnt work?
printf -v var “%s” “hi” | tee somefile
echo “$var” # var is empty
cat somefile # file is empty
https://redd.it/1brz5a9
@r_bash
Works
printf -v var “%s” “hi”
echo “$var”
Works
printf “%s” “hi” | tee somefile
cat somefile
Why this one doesnt work?
printf -v var “%s” “hi” | tee somefile
echo “$var” # var is empty
cat somefile # file is empty
https://redd.it/1brz5a9
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Notifies me through dunst, when volume changes.
It would be nice, if someone could help me, because I don't know a lot about noscripting.
I think this problem is not too difficult.
I want to use wireplumber to show me the volume level in percent through
"wpctl get-volume "@DEFAULT_AUDIO_SINK@".
And I want the message to get displayed though the notifier dunst.
https://redd.it/1bs6iec
@r_bash
It would be nice, if someone could help me, because I don't know a lot about noscripting.
I think this problem is not too difficult.
I want to use wireplumber to show me the volume level in percent through
"wpctl get-volume "@DEFAULT_AUDIO_SINK@".
And I want the message to get displayed though the notifier dunst.
https://redd.it/1bs6iec
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Duplicated HTTPD Log parsing output issue.
I've written a bash noscript that works almost perfectly but I am having an issue with the output. The issue is that each of the data for a filename is being duplicated.
The purpose of the noscript is to parse all of the Apache2 httpd log files in a directory and to count how many times an IP address accesses wp-login.php. It then should output the file name and Ip counts below the filename. While this is working, the output is duplicated for each filename. I've tried so many ways to fix this, but I'm pretty sure it's beyond my skillset. Here is the noscript:
​
​
​
​
https://redd.it/1bsci1e
@r_bash
I've written a bash noscript that works almost perfectly but I am having an issue with the output. The issue is that each of the data for a filename is being duplicated.
The purpose of the noscript is to parse all of the Apache2 httpd log files in a directory and to count how many times an IP address accesses wp-login.php. It then should output the file name and Ip counts below the filename. While this is working, the output is duplicated for each filename. I've tried so many ways to fix this, but I'm pretty sure it's beyond my skillset. Here is the noscript:
​
#!/bin/bash​
log_directory="/var/log/apache2/domlogs"log_files=$(find "$log_directory" -type f ! -name '*bytes*' -size +0 -not -name 'ftp*' -not -name '*imapbytes*' -not -name '*popbytes*' | sort -u)​
for logfile in $log_files; dofilename=$(basename "$logfile")wp_login_accesses=$(awk '$7 == "/wp-login.php" {print $1}' "$logfile")ip_counts=$(echo "$wp_login_accesses" | sort | uniq -c)sorted_counts=$(echo "$ip_counts" | sort -nr)total_count=$(echo "$sorted_counts" | wc -l)​
if [ "$total_count" -ge 5 ]; thentop_5=$(echo "$sorted_counts" | head -n 5)echo "Top 5 IP Addresses in $filename:"while IFS= read -r line; doprintf "%s\n" "$line"done <<< "$top_5"echofidonehttps://redd.it/1bsci1e
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Hex encode
Is it possible to hex encode a string using bash one liner or common built in programs on linux instead of installing some program to do it?
https://redd.it/1bspjxa
@r_bash
Is it possible to hex encode a string using bash one liner or common built in programs on linux instead of installing some program to do it?
https://redd.it/1bspjxa
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Several questions about my shell noscript:
xsetroot -name "$(free -h | awk '/^Mem:/ {print $3 "/" $2}') $(uptime --pretty | sed -e 's/up //g' -e 's/ days/d/g' -e 's/ day/d/g' -e 's/ hours/h/g' -e 's/ hour/h/g' -e 's/ minutes/m/g' -e 's/, / /g') $(date +"%a, %B %d %l:%M%p"| sed 's/ / /g') $(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
1. How do I replace uptime with the load given via the uptime command?
2. How do I make the date ISO-8601 format, and the time 24 hour time?
3. How do I add disk space (/)?
4. Is it possible to add IPv6, wireless, and ethernet, so that it looks the same as i3's:
`wireless _first_ {`
`format_up = "W: (%quality at %essid, %bitrate / frequency) %ip`
`format_down = "W: down"`
`}`
​
`ethernet _first_ {`
`format_up = "E: %ip (%speed)"`
`format_down = "E: down"`
`}`
https://redd.it/1bswqs2
@r_bash
xsetroot -name "$(free -h | awk '/^Mem:/ {print $3 "/" $2}') $(uptime --pretty | sed -e 's/up //g' -e 's/ days/d/g' -e 's/ day/d/g' -e 's/ hours/h/g' -e 's/ hour/h/g' -e 's/ minutes/m/g' -e 's/, / /g') $(date +"%a, %B %d %l:%M%p"| sed 's/ / /g') $(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
1. How do I replace uptime with the load given via the uptime command?
2. How do I make the date ISO-8601 format, and the time 24 hour time?
3. How do I add disk space (/)?
4. Is it possible to add IPv6, wireless, and ethernet, so that it looks the same as i3's:
`wireless _first_ {`
`format_up = "W: (%quality at %essid, %bitrate / frequency) %ip`
`format_down = "W: down"`
`}`
​
`ethernet _first_ {`
`format_up = "E: %ip (%speed)"`
`format_down = "E: down"`
`}`
https://redd.it/1bswqs2
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Having fun trying to figure out how much Perl do I have in my Ubuntu system
Here's what I got:
I'm sure it's not all but I'm getting over 60k LoC
(I was curious about this because it's a language that I hope I'll never learn and so these files will forever be a black box to me :) )
https://redd.it/1bt55t8
@r_bash
Here's what I got:
file /usr/bin/* | grep 'Perl noscript text' | awk '{print $1}' | sed 's/.$//' | xargs wc -l | sort -nI'm sure it's not all but I'm getting over 60k LoC
(I was curious about this because it's a language that I hope I'll never learn and so these files will forever be a black box to me :) )
https://redd.it/1bt55t8
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Is this a minor shellcheck omission?
Assigning a variable that starts with a digit inside an arithmetic context.
#!/bin/bash
1num=$((10+1))
((num=1+2))
((2num=10+2))
echo $num "$2num"
Shellcheck 0.10.0 bash 5.1.16.
$ shellcheck --color=never test.sh
In test.sh line 2:
1num=$((10+1))
^------------^ SC2282 (error): Variable names can't start with numbers, so this is interpreted as a command.
For more information:
https://www.shellcheck.net/wiki/SC2282 -- Variable names can't start with n...
$ bash -x test.sh
• test.sh 2 1num=11
test.sh: line 2: 1num=11: command not found
• test.sh 3 (( num=1+2 ))
• test.sh 4 (( 2num=10+2 ))
test.sh: line 4: ((: 2num: value too great for base (error token is "2num")
• test.sh 5 echo 3 num
3 num
What does
https://redd.it/1bt54vz
@r_bash
Assigning a variable that starts with a digit inside an arithmetic context.
#!/bin/bash
1num=$((10+1))
((num=1+2))
((2num=10+2))
echo $num "$2num"
Shellcheck 0.10.0 bash 5.1.16.
2num on line 4 isn't marked as an error by shellcheck.$ shellcheck --color=never test.sh
In test.sh line 2:
1num=$((10+1))
^------------^ SC2282 (error): Variable names can't start with numbers, so this is interpreted as a command.
For more information:
https://www.shellcheck.net/wiki/SC2282 -- Variable names can't start with n...
$ bash -x test.sh
• test.sh 2 1num=11
test.sh: line 2: 1num=11: command not found
• test.sh 3 (( num=1+2 ))
• test.sh 4 (( 2num=10+2 ))
test.sh: line 4: ((: 2num: value too great for base (error token is "2num")
• test.sh 5 echo 3 num
3 num
What does
value too great for base error actually mean?https://redd.it/1bt54vz
@r_bash
Fetching value from .json file
I've got a .json file that contains the following:
"shared":
{
"delimiter": "|",
"queueFileName": "~/Documents/SendEmailQueue.txt"
}
Then I've got a noscript that fetches the queueFileName value via:
queueFileName=$(jq -r '.shared.queueFileName' Backup.json)
In an attempt to figure out what's happening, specifically the noscript is not finding the file in question, I added the following bit of code:
if -f "${queueFileName}"
then
echo "Queue file, \"${queueFileName}\", is present"
if -s "${queueFileName}"
then
echo "... and it's not empty!"
else
echo "... but empty!"
fi
else
echo "Queue file, \"${queueFileName}\", not found"
fi
When I run the noscript, the following is displayed:
Queue file, "~/Documents/SendEmailQueue.txt", not found
However... if I change the "queueFileName" value in the .json file, (removing the "\~/" shortcut), to this;
"/home/babbayagga/Documents/SendEmailQueue.txt"
The following is displayed in the terminal window:
Queue file, "/home/babbayagga/Documents/SendEmailQueue.txt", is present
... and it's not empty!
It's as if the "\~/" shortcut is not being expanded. Does anyone know why this might be happening?
Thanks!
https://redd.it/1btav5e
@r_bash
I've got a .json file that contains the following:
"shared":
{
"delimiter": "|",
"queueFileName": "~/Documents/SendEmailQueue.txt"
}
Then I've got a noscript that fetches the queueFileName value via:
queueFileName=$(jq -r '.shared.queueFileName' Backup.json)
In an attempt to figure out what's happening, specifically the noscript is not finding the file in question, I added the following bit of code:
if -f "${queueFileName}"
then
echo "Queue file, \"${queueFileName}\", is present"
if -s "${queueFileName}"
then
echo "... and it's not empty!"
else
echo "... but empty!"
fi
else
echo "Queue file, \"${queueFileName}\", not found"
fi
When I run the noscript, the following is displayed:
Queue file, "~/Documents/SendEmailQueue.txt", not found
However... if I change the "queueFileName" value in the .json file, (removing the "\~/" shortcut), to this;
"/home/babbayagga/Documents/SendEmailQueue.txt"
The following is displayed in the terminal window:
Queue file, "/home/babbayagga/Documents/SendEmailQueue.txt", is present
... and it's not empty!
It's as if the "\~/" shortcut is not being expanded. Does anyone know why this might be happening?
Thanks!
https://redd.it/1btav5e
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
What's the best way to find supported colors programmatically?
** Note: GoLang is referenced, but the post is mostly about the bash environment
What's the best way to find all supported colors of a bash shell programmatically?
I'm making an app that helps with formatting text with colors, made with Go, but built for Linux shells. It's working, but I'd like to find a better way of selecting color support.
As of right now, I just check the value output by the
// Convert the TERM variable to lower
switch strings.ToLower(term) {
// 256 colors
case "xterm":
case "rxvt-unicode":
case "rxvt-unicode-256color":
LoadColors256(colors)
// 8 colors
case "ansi":
case "rxvt":
case "linux":
case "vs100":
case "vt220":
LoadColors8(colors)
default:
// Otherwise, load no colors
}
After which, I load a map (dictionary) with up to 256 values that can fetch hex color codes via a color name, then output those colors formatted in RGB later (i.e. '\\033[X8;2;R;G;Bm').
I know this system is very flawed, so I ask:
Is there something else I should be doing?
https://redd.it/1btqkmv
@r_bash
** Note: GoLang is referenced, but the post is mostly about the bash environment
What's the best way to find all supported colors of a bash shell programmatically?
I'm making an app that helps with formatting text with colors, made with Go, but built for Linux shells. It's working, but I'd like to find a better way of selecting color support.
As of right now, I just check the value output by the
tput colors command. If that gives a value other than 8 or 256, I check the TERM environment variable against a list of known TERM values to determine if it's a 256 or 8-color shell. If the TERM is unknown, default to no color.// Convert the TERM variable to lower
switch strings.ToLower(term) {
// 256 colors
case "xterm":
case "rxvt-unicode":
case "rxvt-unicode-256color":
LoadColors256(colors)
// 8 colors
case "ansi":
case "rxvt":
case "linux":
case "vs100":
case "vt220":
LoadColors8(colors)
default:
// Otherwise, load no colors
}
After which, I load a map (dictionary) with up to 256 values that can fetch hex color codes via a color name, then output those colors formatted in RGB later (i.e. '\\033[X8;2;R;G;Bm').
I know this system is very flawed, so I ask:
Is there something else I should be doing?
https://redd.it/1btqkmv
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
I need a noscript
I am trying to write a bash noscript that will search for MAC address pattern in a file. Any suggestions?
https://redd.it/1btqmz7
@r_bash
I am trying to write a bash noscript that will search for MAC address pattern in a file. Any suggestions?
https://redd.it/1btqmz7
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Integer not incrementing correctly (help a bash newb)
Hi guys, made this bash noscript to record a radio show every week, I use id3v2 to insert the metadata / track number but it doesn't seem to wanna work, if someone could tell me what I'm doing wrong I'd greatly appreciate that.
RECORDS_COUNT=$(ls -l $COUNT_PATH | grep \^- | wc -l )
((RECORDS_COUNT+=1))
For some reason RECORDS_COUNT doesn't increment anymore, it only displays the number of files in the path and the +1 doesn't seem to take effect.
​
https://redd.it/1btt9rw
@r_bash
Hi guys, made this bash noscript to record a radio show every week, I use id3v2 to insert the metadata / track number but it doesn't seem to wanna work, if someone could tell me what I'm doing wrong I'd greatly appreciate that.
RECORDS_COUNT=$(ls -l $COUNT_PATH | grep \^- | wc -l )
((RECORDS_COUNT+=1))
For some reason RECORDS_COUNT doesn't increment anymore, it only displays the number of files in the path and the +1 doesn't seem to take effect.
​
https://redd.it/1btt9rw
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
A noscript to automatically rename music folders
Hi!
I'm doing some cleaning in my local music files and I would like to change the way the folders of my albums are named. Currently it is Album name (YYYY), "YYYY" being the release year of the album ; and I would like to change that for : YYYY_Album name
But since I have thousands of albums, I think it would be quite long to do this manually 😬, so I thought about writing a noscript. The only problem is... I do not know how to write a noscript 😭😁
Could you help me to do this ?
🪴
https://redd.it/1bu34ld
@r_bash
Hi!
I'm doing some cleaning in my local music files and I would like to change the way the folders of my albums are named. Currently it is Album name (YYYY), "YYYY" being the release year of the album ; and I would like to change that for : YYYY_Album name
But since I have thousands of albums, I think it would be quite long to do this manually 😬, so I thought about writing a noscript. The only problem is... I do not know how to write a noscript 😭😁
Could you help me to do this ?
🪴
https://redd.it/1bu34ld
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Conditional pipe? or a command that can conditionally pipe data
Got this command in .xinitrc:
I sometime switch between computers, and in one of theme the keyboard is faulty so I tend to run this to disable it; but it also runs on the non-faulty computer;
I was wondering if there was a way (beside storing in a variable then check) to run
there probably is a simpler way, like checking before starting to pipe, but this is a pattern I run into quiet often and would love to know if there is a way to solve it;
https://redd.it/1bus1fw
@r_bash
Got this command in .xinitrc:
xinput list | grep -oP '(AT Translated Set 2 keyboard|DualPoint Stick)\s+id=\K\d+' | xargs -n1 xinput disableI sometime switch between computers, and in one of theme the keyboard is faulty so I tend to run this to disable it; but it also runs on the non-faulty computer;
I was wondering if there was a way (beside storing in a variable then check) to run
xinput disable on condition that stdin has two lines? (one line to match keyboard's ID and one to match the dualpoint's ID?)there probably is a simpler way, like checking before starting to pipe, but this is a pattern I run into quiet often and would love to know if there is a way to solve it;
https://redd.it/1bus1fw
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
New to coding
Sorry this maybe the stupidest question any of you have read. But is it post to write a bash noscript that will run in a Windows OS.
https://redd.it/1bv7nq7
@r_bash
Sorry this maybe the stupidest question any of you have read. But is it post to write a bash noscript that will run in a Windows OS.
https://redd.it/1bv7nq7
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
blog Journey of disabling filename expansion for Bash alias
I wanted to disable Bash pathname expansion for my Bash alias:
This ended up being not trivial, as there was trouble lot of different trouble with pipes/stdin. In the end I managed to find working solution and wrote blog post about the steps leading to it:
https://miropalmu.github.io/homepage/bash\_noglob\_for\_alias.html
TLDL:
where the definitions of the Bash function
https://redd.it/1bvs0rd
@r_bash
I wanted to disable Bash pathname expansion for my Bash alias:
alias g='git'This ended up being not trivial, as there was trouble lot of different trouble with pipes/stdin. In the end I managed to find working solution and wrote blog post about the steps leading to it:
https://miropalmu.github.io/homepage/bash\_noglob\_for\_alias.html
TLDL:
alias g='pstash galias; set -o noglob; consume_noglob_and_pstash galias git'where the definitions of the Bash function
pstash and consume_noglob_and_pstash can be found at end of the blog post.https://redd.it/1bvs0rd
@r_bash
bash noscript to organize files based off the file extensions.
Trying to organize my files a little bit. How would I go about writing out this noscript?
https://redd.it/1bw15pq
@r_bash
Trying to organize my files a little bit. How would I go about writing out this noscript?
https://redd.it/1bw15pq
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community