Problem with imgur upload noscript
The noscript that xfce screenshot tool is using to upload screenshots to imgur stopped working, but i don't know if the problem is with the sctipt of changes in imgur api. I am just average linux user. Can someone check the noscript: https://pastebin.com/5SunZpkk
https://redd.it/1j4t512
@r_bash
The noscript that xfce screenshot tool is using to upload screenshots to imgur stopped working, but i don't know if the problem is with the sctipt of changes in imgur api. I am just average linux user. Can someone check the noscript: https://pastebin.com/5SunZpkk
https://redd.it/1j4t512
@r_bash
Pastebin
#!/bin/sh# Permission to use, copy, modify, and/or distribute this software - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I've created windows switcher
I created something handy today and I would like to share it and maybe get your opinion/suggestion. I've created window switcher noscripts that mapped to Ubuntu custom shortcut keys. When triggered it instantly finds the intended windows and switch to it no matter where you are in the workspace (reduces the need for constant alt+tab). This minimizes time and effort to navigate if you have many windows and workspace on. It uses wmctrl tool
I've created so far four switchers: terminal switcher, firefox switcher, google-chatgpt switcher, youtube switcher since these are my primary window cycles
[ubuntu keyboard custom shortcuts setting](https://preview.redd.it/3xkjyctq11ne1.png?width=515&format=png&auto=webp&s=d15a68225b5afefa4bc84b64ed40bfd2b3f40e61)
//terminal\_sw.sh (switch to your terminal. I keep all terminals in one workspace)
#!/bin/bash
wmctrl -a ubuntu <your_username>@ubuntu:~
//google\_sw.sh (it actually is a chatgpt switcher on google browser. The only way i know how to do chatgpt switcher)
#!/bin/bash
wmctrl -a Google Chrome
//firefox\_sw.sh (targeted firefox browser, need to explicitly exclude "YouTube" window to avoid conflating with youtube-only window)
#!/bin/bash
# Find a Firefox window that does not contain "YouTube"
window_id=$(wmctrl -lx | grep "Mozilla Firefox" | grep -v "YouTube" | awk '{print $1}' | head -n 1)
if [ -n "$window_id" ]; then
wmctrl -ia "$window_id"
else
echo "No matching Firefox window found."
fi
//youtube\_sw.sh (targeted firefox with youtube-only window)
#!/bin/bash
# Find a Firefox window that contains "YouTube"
window_id=$(wmctrl -lx | grep "YouTube — Mozilla Firefox" | awk '{print $1}' | head -n 1)
if [ -n "$window_id" ]; then
wmctrl -ia "$window_id"
else
echo "No YouTube window found."
fi
https://redd.it/1j4qy4v
@r_bash
I created something handy today and I would like to share it and maybe get your opinion/suggestion. I've created window switcher noscripts that mapped to Ubuntu custom shortcut keys. When triggered it instantly finds the intended windows and switch to it no matter where you are in the workspace (reduces the need for constant alt+tab). This minimizes time and effort to navigate if you have many windows and workspace on. It uses wmctrl tool
I've created so far four switchers: terminal switcher, firefox switcher, google-chatgpt switcher, youtube switcher since these are my primary window cycles
[ubuntu keyboard custom shortcuts setting](https://preview.redd.it/3xkjyctq11ne1.png?width=515&format=png&auto=webp&s=d15a68225b5afefa4bc84b64ed40bfd2b3f40e61)
//terminal\_sw.sh (switch to your terminal. I keep all terminals in one workspace)
#!/bin/bash
wmctrl -a ubuntu <your_username>@ubuntu:~
//google\_sw.sh (it actually is a chatgpt switcher on google browser. The only way i know how to do chatgpt switcher)
#!/bin/bash
wmctrl -a Google Chrome
//firefox\_sw.sh (targeted firefox browser, need to explicitly exclude "YouTube" window to avoid conflating with youtube-only window)
#!/bin/bash
# Find a Firefox window that does not contain "YouTube"
window_id=$(wmctrl -lx | grep "Mozilla Firefox" | grep -v "YouTube" | awk '{print $1}' | head -n 1)
if [ -n "$window_id" ]; then
wmctrl -ia "$window_id"
else
echo "No matching Firefox window found."
fi
//youtube\_sw.sh (targeted firefox with youtube-only window)
#!/bin/bash
# Find a Firefox window that contains "YouTube"
window_id=$(wmctrl -lx | grep "YouTube — Mozilla Firefox" | awk '{print $1}' | head -n 1)
if [ -n "$window_id" ]; then
wmctrl -ia "$window_id"
else
echo "No YouTube window found."
fi
https://redd.it/1j4qy4v
@r_bash
New to bash, had a question about weird command substitution case
I've been taking an introduction to Linux and Bash course at my college and we came across this case when using echo and command substitution with variables. I thought that it would actually print the random number, but no matter how many echo $() I put, it always prints $RANDOM
export META='$RANDOM'
echo $(echo $(echo $META))
Can someone help me understand this interaction? Thank you
https://redd.it/1j4fz6t
@r_bash
I've been taking an introduction to Linux and Bash course at my college and we came across this case when using echo and command substitution with variables. I thought that it would actually print the random number, but no matter how many echo $() I put, it always prints $RANDOM
export META='$RANDOM'
echo $(echo $(echo $META))
Can someone help me understand this interaction? Thank you
https://redd.it/1j4fz6t
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
how to make my bash noscript take lesser ram?
So, I wrote a bash noscript that would randomize my wallpaper from a folder and i made it such that it starts up when my pc boots up in hyprland.conf file but there is one drawback and that is gradually it takes up all the ram.
HOW do i make it such that it doesn't take all the ram?
https://redd.it/1j5fe56
@r_bash
So, I wrote a bash noscript that would randomize my wallpaper from a folder and i made it such that it starts up when my pc boots up in hyprland.conf file but there is one drawback and that is gradually it takes up all the ram.
HOW do i make it such that it doesn't take all the ram?
https://redd.it/1j5fe56
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Tar2Deb
Pure bash noscript that converts a tar file into a deb file
in order to install tar2deb you need wget, note only works for debian based distros.
features
automatically move images in the extracted tar directory that holds a subdirectory with the most images then export it as a variable then moves to the deb directory, the deb directory is needed in order to create a .deb file, it uses imagemagick to move each image by dimension, before the dimensions and after is extracts the tar file it will ask the user what does want the package name be, does not allow numbers except 2, then the name of the package the user chooses will be exported as a variable, then it will ask the user what is version of your package, once the user chosen its version for the package it will be exported as a variable then combine those to variables like this $PackageName-$Version then it will create the directory with those 2 variables then it will ask the user what name of the maintainer, whatever name the user decides will be exported as a variable, then it asks the user what is the package about, whatever the users type will also because exported as variable, then it will create the control file in the deb dir DEBIAN folder, then once the control file is created, it will create the directories in the deb directory, then it will find a graphical executable file (excluding binary files) and move to deb_dir/usr/bin after it does then it will go the dimensions after it moves the dimension it will ask the user a yes or no prompt asking if it wants to rename all image files moved into one name if the users say no then it will ask the user if it wants to rename a file from the numerical list and whatever numbers it chooses it will prompt the user what the name to be for the file then it combine that name with the file extension and renames the chosen file with the name that user choose, then it create a desktop if there is not an desktop file in the tar directory it will ask the user if it wants to create a desktop since there is not located in tar directory if the users say user then it do a prompt asking the user what executable file it wants to choose for desktop file then it will show a numerical list showing a list of images and whatever image the user chooses will be the icon of the desktop file once the desktop file is
how to install tar2deb
sudo apt install wget && wget https://github.com/GitXpresso/Tar2Deb/releases/download/v.1.0.0/tar2deb-1.0.0.deb && sudo apt install -y ./tar2deb-1.0.0.deb
https://redd.it/1j5u1xh
@r_bash
Pure bash noscript that converts a tar file into a deb file
in order to install tar2deb you need wget, note only works for debian based distros.
features
automatically move images in the extracted tar directory that holds a subdirectory with the most images then export it as a variable then moves to the deb directory, the deb directory is needed in order to create a .deb file, it uses imagemagick to move each image by dimension, before the dimensions and after is extracts the tar file it will ask the user what does want the package name be, does not allow numbers except 2, then the name of the package the user chooses will be exported as a variable, then it will ask the user what is version of your package, once the user chosen its version for the package it will be exported as a variable then combine those to variables like this $PackageName-$Version then it will create the directory with those 2 variables then it will ask the user what name of the maintainer, whatever name the user decides will be exported as a variable, then it asks the user what is the package about, whatever the users type will also because exported as variable, then it will create the control file in the deb dir DEBIAN folder, then once the control file is created, it will create the directories in the deb directory, then it will find a graphical executable file (excluding binary files) and move to deb_dir/usr/bin after it does then it will go the dimensions after it moves the dimension it will ask the user a yes or no prompt asking if it wants to rename all image files moved into one name if the users say no then it will ask the user if it wants to rename a file from the numerical list and whatever numbers it chooses it will prompt the user what the name to be for the file then it combine that name with the file extension and renames the chosen file with the name that user choose, then it create a desktop if there is not an desktop file in the tar directory it will ask the user if it wants to create a desktop since there is not located in tar directory if the users say user then it do a prompt asking the user what executable file it wants to choose for desktop file then it will show a numerical list showing a list of images and whatever image the user chooses will be the icon of the desktop file once the desktop file is
how to install tar2deb
sudo apt install wget && wget https://github.com/GitXpresso/Tar2Deb/releases/download/v.1.0.0/tar2deb-1.0.0.deb && sudo apt install -y ./tar2deb-1.0.0.deb
https://redd.it/1j5u1xh
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
backup copy of .bashrc for the root directory?
i found a copy of .bashrc in /etc/skel but the .bashrc file in /root is another one
https://redd.it/1j6v9l7
@r_bash
i found a copy of .bashrc in /etc/skel but the .bashrc file in /root is another one
https://redd.it/1j6v9l7
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Command completion suggestions while typing?
How to get the behaviour of when I type in say,
https://redd.it/1j6o5zg
@r_bash
How to get the behaviour of when I type in say,
lo or lon, a faded g_cmd appears after the cursor (for a command long_cmd), which after pressing <TAB>, gets un-faded/is written to the input line? I tried looking but couldn't really find anything. I just got fzf, it provides completion but only after you type in a command. TIA.https://redd.it/1j6o5zg
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
HELP Please. The while loop is running before SSH has ended completely.
https://preview.redd.it/6yv2drjx0ine1.png?width=687&format=png&auto=webp&s=afaef25c281cf083cbc5685e7552203ef6375e58
https://preview.redd.it/f622kvze1ine1.png?width=596&format=png&auto=webp&s=943b60670c3d4ce0e63d5e143673302c5db97f08
So I wrote this code to automate ssh and storing passwords in OverTheWire challenge.
Problem : When I press Enter nothing happens.
What I think the problem is : The while loop starts running before the SSH ends completely. Even GPT did not help.
Can someone please tell me wat the issue is, and how to fix it?
https://redd.it/1j6lxab
@r_bash
https://preview.redd.it/6yv2drjx0ine1.png?width=687&format=png&auto=webp&s=afaef25c281cf083cbc5685e7552203ef6375e58
https://preview.redd.it/f622kvze1ine1.png?width=596&format=png&auto=webp&s=943b60670c3d4ce0e63d5e143673302c5db97f08
So I wrote this code to automate ssh and storing passwords in OverTheWire challenge.
Problem : When I press Enter nothing happens.
What I think the problem is : The while loop starts running before the SSH ends completely. Even GPT did not help.
Can someone please tell me wat the issue is, and how to fix it?
https://redd.it/1j6lxab
@r_bash
In theory, could all quoting be achieved with just the backlash character? Or are there instances where single quotes are required
In other words, are single quotes supported by necessity or pure convenience?
https://redd.it/1j7jak3
@r_bash
In other words, are single quotes supported by necessity or pure convenience?
https://redd.it/1j7jak3
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
exitcode from a pipe inside an if statement
Backstory, SomeCommand produces 15-20 lines of output that the user needs to read. Sometimes it fails, most of the time in a known way.
My approach has been
if [[ `SomeCommand |tee /dev/stderr |grep -c Known Error; Xcode=${PIPESTATUS[0\]}` -gt 0 \]\]; then
echo Known error $Xcode
else
echo Unknown error $Xcode
exit
fi
/dev/stderr goes to the console so the user can see the output
grep finds the known error string & handles it correctly
but...
$Xcode is always 0 :(
If $Xcode is >0 and it's not the known error, the noscript should terminate.
Have been using true, false & echo as SomeCommand for testing, maybe this is an issue.
It's not the |tee part
if [[ `false |grep -c Known Error; Xcode=${PIPESTATUS[0\]}` -gt 0 \]\]; then echo found $Xcode; else echo not found $Xcode; fi
not found 0
It's something to do with the if [[ `...` \]\] bit
false |tee /dev/stderr |grep -c Known Error; Xcode=${PIPESTATUS[0\]}; echo $Xcode
0
1
If it's changed to if [...\], then it's always 1
if [ `echo "Known Error" |tee /dev/stderr |grep -c "Known Error"; Xcode=${PIPESTATUS[0\]}` -gt 0 \]; then echo found $Xcode; else echo not found $Xcode; fi
Known Error
found 1
if [ `echo "Unknown Error" |tee /dev/stderr |grep -c "Known Error"; Xcode=${PIPESTATUS[0\]}` -gt 0 \]; then echo found $Xcode; else echo not found $Xcode; fi
Unknown Error
not found 1
Someone please put me out of my misery.
https://redd.it/1j7q8as
@r_bash
Backstory, SomeCommand produces 15-20 lines of output that the user needs to read. Sometimes it fails, most of the time in a known way.
My approach has been
if [[ `SomeCommand |tee /dev/stderr |grep -c Known Error; Xcode=${PIPESTATUS[0\]}` -gt 0 \]\]; then
echo Known error $Xcode
else
echo Unknown error $Xcode
exit
fi
/dev/stderr goes to the console so the user can see the output
grep finds the known error string & handles it correctly
but...
$Xcode is always 0 :(
If $Xcode is >0 and it's not the known error, the noscript should terminate.
Have been using true, false & echo as SomeCommand for testing, maybe this is an issue.
It's not the |tee part
if [[ `false |grep -c Known Error; Xcode=${PIPESTATUS[0\]}` -gt 0 \]\]; then echo found $Xcode; else echo not found $Xcode; fi
not found 0
It's something to do with the if [[ `...` \]\] bit
false |tee /dev/stderr |grep -c Known Error; Xcode=${PIPESTATUS[0\]}; echo $Xcode
0
1
If it's changed to if [...\], then it's always 1
if [ `echo "Known Error" |tee /dev/stderr |grep -c "Known Error"; Xcode=${PIPESTATUS[0\]}` -gt 0 \]; then echo found $Xcode; else echo not found $Xcode; fi
Known Error
found 1
if [ `echo "Unknown Error" |tee /dev/stderr |grep -c "Known Error"; Xcode=${PIPESTATUS[0\]}` -gt 0 \]; then echo found $Xcode; else echo not found $Xcode; fi
Unknown Error
not found 1
Someone please put me out of my misery.
https://redd.it/1j7q8as
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
New to Bash Scripting and Sysadmin? Check Out My Tool: Linux Console Manager (Open Source - All Feedback Appreciated)
Hi r/bash community!
I'm a new Redditor, and I wanted to share a simple bash noscript I've been working on called Linux Console Manager. I'm actually from Korea and haven't used Reddit much before, but I'm excited to share this with you all!
As someone who occasionally does Linux system administration, I found myself constantly typing the same commands over and over. So, I created this little tool to streamline those common tasks and make my life a bit easier. I thought it might be helpful for others too, especially those who are newer to Linux or just want a quicker way to manage their systems from the terminal.
Key Features:
System Monitoring: Tired of typing top, free -m, df -h, and ifconfig separately? Linux Console Manager gives you a quick, consolidated overview of essential system metrics like CPU usage, memory consumption, disk space, and network stats in one place!
Service Control: Managing system services like Apache, Nginx, or MySQL can be a bit tedious with systemctl. This noscript lets you easily start, stop, restart, and check the status of your services through a simple menu. No more struggling to remember those commands!
Process Management: Quickly identify and manage running processes. Need to find that resource-hogging process? Linux Console Manager helps you easily find and even kill processes directly from the noscript.
Network Utilities: Basic network troubleshooting tools like ping and traceroute are built right in, making it convenient for quick network checks.
\[Add other key features of your noscript here - Be specific! For example:\]
User Management: Easily add, delete, or modify user accounts with simple menu options.
Log Viewing: Quickly access and view common system logs like /var/log/syslog or /var/log/auth.log.
Package Management (Debian/Ubuntu based): Simple interface for updating packages or searching for new ones using apt.
The noscript is completely open source and available on GitHub: https://github.com/forsys02/linux\_console\_manager
https://preview.redd.it/1avm3lnnsune1.png?width=458&format=png&auto=webp&s=25a753e1bb074cbc0dbd4e8f4a93c8caa952de5f
I would love for you to try it out and give me your feedback! I'm really open to suggestions for improvement and new features. Specifically, I'm curious about:
Is the menu structure intuitive and easy to navigate?
Are there any features you think are missing or could be more useful?
Do you find it helpful in your daily system administration tasks?
I'd especially appreciate feedback from both experienced sysadmins and those who are newer to Linux. Let me know what you think!
This is a project I'm working on in my spare time, and I hope it can be helpful to others in the community.
Thanks for checking it out! Happy noscripting! 😊
https://redd.it/1j7x3vj
@r_bash
Hi r/bash community!
I'm a new Redditor, and I wanted to share a simple bash noscript I've been working on called Linux Console Manager. I'm actually from Korea and haven't used Reddit much before, but I'm excited to share this with you all!
As someone who occasionally does Linux system administration, I found myself constantly typing the same commands over and over. So, I created this little tool to streamline those common tasks and make my life a bit easier. I thought it might be helpful for others too, especially those who are newer to Linux or just want a quicker way to manage their systems from the terminal.
Key Features:
System Monitoring: Tired of typing top, free -m, df -h, and ifconfig separately? Linux Console Manager gives you a quick, consolidated overview of essential system metrics like CPU usage, memory consumption, disk space, and network stats in one place!
Service Control: Managing system services like Apache, Nginx, or MySQL can be a bit tedious with systemctl. This noscript lets you easily start, stop, restart, and check the status of your services through a simple menu. No more struggling to remember those commands!
Process Management: Quickly identify and manage running processes. Need to find that resource-hogging process? Linux Console Manager helps you easily find and even kill processes directly from the noscript.
Network Utilities: Basic network troubleshooting tools like ping and traceroute are built right in, making it convenient for quick network checks.
\[Add other key features of your noscript here - Be specific! For example:\]
User Management: Easily add, delete, or modify user accounts with simple menu options.
Log Viewing: Quickly access and view common system logs like /var/log/syslog or /var/log/auth.log.
Package Management (Debian/Ubuntu based): Simple interface for updating packages or searching for new ones using apt.
The noscript is completely open source and available on GitHub: https://github.com/forsys02/linux\_console\_manager
https://preview.redd.it/1avm3lnnsune1.png?width=458&format=png&auto=webp&s=25a753e1bb074cbc0dbd4e8f4a93c8caa952de5f
I would love for you to try it out and give me your feedback! I'm really open to suggestions for improvement and new features. Specifically, I'm curious about:
Is the menu structure intuitive and easy to navigate?
Are there any features you think are missing or could be more useful?
Do you find it helpful in your daily system administration tasks?
I'd especially appreciate feedback from both experienced sysadmins and those who are newer to Linux. Let me know what you think!
This is a project I'm working on in my spare time, and I hope it can be helpful to others in the community.
Thanks for checking it out! Happy noscripting! 😊
https://redd.it/1j7x3vj
@r_bash
i want to put raw code into a variable by utilizing heredoc, but it seems that the outer syntax is interpreting things
what i'm trying to do is make a noscript that would put some boilerplate code into files, so i need raw unexecuted code in a variable.
the smallest example of my problem can be shown with this code:
regardless of which of the 4 combinations of fixes i apply here (having quotes around
as i understand it, it's the outer syntax
is there an elegant solution to this so that i don't have to resort to using echo with lots of character escaping?
https://redd.it/1j8q85k
@r_bash
what i'm trying to do is make a noscript that would put some boilerplate code into files, so i need raw unexecuted code in a variable.
the smallest example of my problem can be shown with this code:
DEFAULT_PROGRAM=$(cat <<'EOF'
\)
EOF
)
echo $DEFAULT_PROGRAM
regardless of which of the 4 combinations of fixes i apply here (having quotes around
EOF or not, and having the inner parenthesis escaped or not), it seems to never output just the raw parenthesis. Either it outputs the escaping character too \), or it errors out by saying:EOF: command not found
syntax error near unexpected token `)'
`)'
as i understand it, it's the outer syntax
$(cat ... ) that breaks it.is there an elegant solution to this so that i don't have to resort to using echo with lots of character escaping?
https://redd.it/1j8q85k
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
What is the purpose of /dev/tty ?
Please hear me out. So, reading about special devices like tty, tty0, pst1...pstn I understand in loose terms that terminal emulators (like the ones you bring up with ctrl+t ) are special devices under /dev/pts/<some_number> . Now, tty0 appears to be a terminal associated to kernel itself (I still don't know what that means). But tty? I only know that it points to the current terminal being used but I don't know exactly what to make of that and how it pertains to the following humble little snippet I wrote:
#!/bin/bash
while read -r filename
do
echo "Current fie: ${filename}"
read -p "Delete ${filename} ? " response < /dev/tty
if [[ $response = 'y' || $response = 'Y' ]]
then
echo "response was yes"
echo "Deleting ${filename}"
tar vf pdf_files.tar --delete "${filename}"
echo
else
echo "skipping"
fi
done < <(tar tf pdf_files.tar)
You'll notice that in the line that contains the read -p command I had to redirect input from tty. I had chatGPT suggest that to me after many failed attempts at getting my little noscript to run correctly because I didn't understand why $response variable would be automatically set to something and the noscript wouldn't even wait at the prompt for me to enter something. I had my eyes OPENED today -- and in a frustrating way -- as to how many little tricks and things one must take into account when learning bash noscripting.
So, going back to the noscript, why did I even need to do that or more importantly, WHEN do I need to do that kind of trick again?
p.s. I've been learning from time to time bash noscripting for like the past 3 o 4 months and I know I have to learn a lot more, but Jesus, the journey feels never-ending.
https://redd.it/1j98bb0
@r_bash
Please hear me out. So, reading about special devices like tty, tty0, pst1...pstn I understand in loose terms that terminal emulators (like the ones you bring up with ctrl+t ) are special devices under /dev/pts/<some_number> . Now, tty0 appears to be a terminal associated to kernel itself (I still don't know what that means). But tty? I only know that it points to the current terminal being used but I don't know exactly what to make of that and how it pertains to the following humble little snippet I wrote:
#!/bin/bash
while read -r filename
do
echo "Current fie: ${filename}"
read -p "Delete ${filename} ? " response < /dev/tty
if [[ $response = 'y' || $response = 'Y' ]]
then
echo "response was yes"
echo "Deleting ${filename}"
tar vf pdf_files.tar --delete "${filename}"
echo
else
echo "skipping"
fi
done < <(tar tf pdf_files.tar)
You'll notice that in the line that contains the read -p command I had to redirect input from tty. I had chatGPT suggest that to me after many failed attempts at getting my little noscript to run correctly because I didn't understand why $response variable would be automatically set to something and the noscript wouldn't even wait at the prompt for me to enter something. I had my eyes OPENED today -- and in a frustrating way -- as to how many little tricks and things one must take into account when learning bash noscripting.
So, going back to the noscript, why did I even need to do that or more importantly, WHEN do I need to do that kind of trick again?
p.s. I've been learning from time to time bash noscripting for like the past 3 o 4 months and I know I have to learn a lot more, but Jesus, the journey feels never-ending.
https://redd.it/1j98bb0
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
How to use "cut" correctly
Hi there,
I have a file with urls in it, followed by a little denoscription.
`www.lol.com`
I want to use dmenu to open it in a brower, at the moment, I'm using this line :
But sometimes it fails because xargs takes the full line with the spaces and the denoscription. How would you do to still print the whole line in dmenu, but only takes the first part (url) into args ?
https://redd.it/1j9gewb
@r_bash
Hi there,
I have a file with urls in it, followed by a little denoscription.
`www.lol.com`
///denoscriptionI want to use dmenu to open it in a brower, at the moment, I'm using this line :
cat ~/world/Documents/bookmarks | ~/.config/sway/noscripts/mydmenu -p "Bookmarks:" | xargs -0 -I {} firefox "{}"But sometimes it fails because xargs takes the full line with the spaces and the denoscription. How would you do to still print the whole line in dmenu, but only takes the first part (url) into args ?
https://redd.it/1j9gewb
@r_bash
LOL.com
Welcome Each day contains multiple jokes right now so that we could get our content back up. We’re hoping to eventually have each joke as an individual post, with tags which would be more …
Collections of very useful Bash Functions
I use Bash a lot working with applications, systems, containers or networks, mgmt & integration.
I've found and frequently use a few really useful Bash Github repositories with collections of Bash "Functions" that you can use in your own Bash noscripts.
I've learned a lot from them and have to say my Bash noscripts now have capabilities I'd probably never been smart enough to create myself. In your own noscript(s) you just "source" the file you create or download from the following URLs:
I am sharing this info in case someone else finds them useful.
# Collections of Functions for Bash
GUI'sEasyBashGUI: **https://github.com/BashGui/easybashgui/blob/master/docs/install.md**
>Simplified way to code bash made GUI frontend dialogs!
Script-Dialog: **https://github.com/lunarcloud/noscript-dialog?tab=readme-ov-file**
>Create bash noscripts that utilize the best dialog system that is available. Intended for Linux,
but has been tested on macOS and Windows, and should work on other unix-like OSs.
If it's launched from a GUI (like a
\- it will prefer kdialog in Qt-based desktops and zenity in other environments.
If neither of those are available
\- then
If it's launched in a terminal
\- It will use whiptail or dialog
If neither of those are available, then it will fallback to basic terminal input/output with tools like
Collections of General Bash FunctionsBashMatic: **https://github.com/kigster/bashmatic**
>Bashmatic is a BASH framework, meaning its a collection of BASH functions (almost 900 of them) that, we hope, make BASH programming easier, more enjoyable, and more importantly, fun \- due to the library’s focus on providing the developer with a constant feedback about what is happening, while a noscript that uses Bashmatic’s helpers is running.
Bash-Concurrent: **https://github.com/themattrix/bash-concurrent**
>A Bash function to run tasks in parallel and display pretty output as they complete.
https://redd.it/1j9lkzi
@r_bash
I use Bash a lot working with applications, systems, containers or networks, mgmt & integration.
I've found and frequently use a few really useful Bash Github repositories with collections of Bash "Functions" that you can use in your own Bash noscripts.
I've learned a lot from them and have to say my Bash noscripts now have capabilities I'd probably never been smart enough to create myself. In your own noscript(s) you just "source" the file you create or download from the following URLs:
I am sharing this info in case someone else finds them useful.
# Collections of Functions for Bash
GUI'sEasyBashGUI: **https://github.com/BashGui/easybashgui/blob/master/docs/install.md**
>Simplified way to code bash made GUI frontend dialogs!
Script-Dialog: **https://github.com/lunarcloud/noscript-dialog?tab=readme-ov-file**
>Create bash noscripts that utilize the best dialog system that is available. Intended for Linux,
but has been tested on macOS and Windows, and should work on other unix-like OSs.
If it's launched from a GUI (like a
.desktop shortcut or the dolphin file manager) \- it will prefer kdialog in Qt-based desktops and zenity in other environments.
If neither of those are available
\- then
relaunch-if-not-visible will relaunch the app in a terminal so that a terminal UI can be used. If it's launched in a terminal
\- It will use whiptail or dialog
If neither of those are available, then it will fallback to basic terminal input/output with tools like
read and echoCollections of General Bash FunctionsBashMatic: **https://github.com/kigster/bashmatic**
>Bashmatic is a BASH framework, meaning its a collection of BASH functions (almost 900 of them) that, we hope, make BASH programming easier, more enjoyable, and more importantly, fun \- due to the library’s focus on providing the developer with a constant feedback about what is happening, while a noscript that uses Bashmatic’s helpers is running.
Bash-Concurrent: **https://github.com/themattrix/bash-concurrent**
>A Bash function to run tasks in parallel and display pretty output as they complete.
https://redd.it/1j9lkzi
@r_bash
GitHub
easybashgui/docs/install.md at master · BashGui/easybashgui
EasyBashGUI is a Bash functions library for *BSD and GNU/Linux that aims to give simple GUI functions using yad, gtkdialog, kdialog, zenity, Xdialog, gum, qarma, (c)dialog, whiptail or bash bui...