Need help - (List the folders that contain the specified file and select from the list and move)
Hi,
I'm new to bash noscripting, just starting to automate my linux journey. :)
I've been trying to find solutions to this, without any luck.
​
What the noscript should do:
\- cd to the main folder (Application)
\- Find which profile folders contain a specific file (File_X) and list them
\- The selection is made with a number, after which the noscript will move to that folder.
​
File structure:
/Application/profile 1/File_X
/Application/profile 2/
/Application/profile 3/File_X
/Application/profile 4/File_X
​
"These profile folders contain the necessary file you want to update:"
1. profile 1
2. profile 3
3. profile 4
"Give number to select" -> 2
\-> move to that selected folder -> profile 3
​
I hope my explanation is clear on some level. If you have a solution to this, I'd love to see it in the answers. If possible, could you also explain a bit what the different commands do. Like I said, I don't have much experience. However, I don't just want to copy/paste finished code, I also want to learn at the same time.
​
https://redd.it/17iyx9p
@r_bash
Hi,
I'm new to bash noscripting, just starting to automate my linux journey. :)
I've been trying to find solutions to this, without any luck.
​
What the noscript should do:
\- cd to the main folder (Application)
\- Find which profile folders contain a specific file (File_X) and list them
\- The selection is made with a number, after which the noscript will move to that folder.
​
File structure:
/Application/profile 1/File_X
/Application/profile 2/
/Application/profile 3/File_X
/Application/profile 4/File_X
​
"These profile folders contain the necessary file you want to update:"
1. profile 1
2. profile 3
3. profile 4
"Give number to select" -> 2
\-> move to that selected folder -> profile 3
​
I hope my explanation is clear on some level. If you have a solution to this, I'd love to see it in the answers. If possible, could you also explain a bit what the different commands do. Like I said, I don't have much experience. However, I don't just want to copy/paste finished code, I also want to learn at the same time.
​
https://redd.it/17iyx9p
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Split string to an array with IFS by linebreak
Hello,
I am struggling with a simple task. I'm coming from python and decided to write a noscript with bash. For now I regret this, but try to accomplish it to learn. With python I would have finish this hours ago.
Here is the problem: I want to covert to following string to an iteratable array:
The result array should contain:
"Hello, hello1", "World", "How", "Are", "You"
Note, I cannot split by comma, since the elements itself can contain commas.
I tried:
When I echo the output, I see:
But if I use
it just doesn't work whatever I try. I only get a single elements back in $stringarray. The newlines are somehow ignored.
Any ideas?
Many thanks in advance!
https://redd.it/17izwtn
@r_bash
Hello,
I am struggling with a simple task. I'm coming from python and decided to write a noscript with bash. For now I regret this, but try to accomplish it to learn. With python I would have finish this hours ago.
Here is the problem: I want to covert to following string to an iteratable array:
[ "Hello, hello1", "World", "How", "Are", "You" ]
The result array should contain:
"Hello, hello1", "World", "How", "Are", "You"
Note, I cannot split by comma, since the elements itself can contain commas.
I tried:
the_string=$(echo $the_string | tr -d '[' | tr -d ']' | sed 's/\", \"/"\\n"/g')
When I echo the output, I see:
"Hello, hello1"
"World"
"How"
"Are"
"You"
But if I use
IFS=$'\n' read -r -a string_array <<< "$the_string"
it just doesn't work whatever I try. I only get a single elements back in $stringarray. The newlines are somehow ignored.
Any ideas?
Many thanks in advance!
https://redd.it/17izwtn
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Create an If/Else Statement based on user input
I'm trying to add a portion to a noscript I'm making to just verify if something is installed, in this case I just want to verify if Flatpak is already installed on the computer, and if not, give the user the option to install Flatpak if they want to or not.
This is what I have so far but I'm unsure what command to use for user input. I did some Googling and found that the
dpkg -s "flatpak" &> /dev/null
if $? -ne 0
then
echo "Flatpak is not currently installed on your system."
echo "Would you like to install Flatpak? (y,n): "
NOT SURE WHAT TO PUT HERE
else
echo "Flatpak is installed. Starting download shortly. . ."
fi
https://redd.it/17k1yg2
@r_bash
I'm trying to add a portion to a noscript I'm making to just verify if something is installed, in this case I just want to verify if Flatpak is already installed on the computer, and if not, give the user the option to install Flatpak if they want to or not.
This is what I have so far but I'm unsure what command to use for user input. I did some Googling and found that the
read command might work, but when I look up the man page on it on my machine, it looks different than what i'm seeing on sites like stackoverflow or AskUbuntu:dpkg -s "flatpak" &> /dev/null
if $? -ne 0
then
echo "Flatpak is not currently installed on your system."
echo "Would you like to install Flatpak? (y,n): "
NOT SURE WHAT TO PUT HERE
else
echo "Flatpak is installed. Starting download shortly. . ."
fi
https://redd.it/17k1yg2
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
JQ - filter datasets in array based on index value within each dataset of array.
I have a very large JSON file.
Inside that JSON file I am only interested in the data that exists with a certain value in one of the indexes within that array.
I am trying to figure out how to use JQ to export the complete datasets where
Example output desired:
{
"id": "651",
"parent_id": "0",
"topmost_parent_id": "0",
"children_count": "0",
"actor_type": "users",
"actor_id": "alec",
"message": "Please advise on whether I may need to edit down these bios.",
"verb": "comment",
"creation_timestamp": "2023-10-11 12:52:56",
"latest_child_timestamp": null,
"object_type": "deckCard",
"object_id": "77",
"reference_id": null,
"reactions": null,
"expire_date": null
},
{
"id": "652",
"parent_id": "0",
"topmost_parent_id": "0",
"children_count": "0",
"actor_type": "users",
"actor_id": "alec",
"message": "There images have been attached to this card.",
"verb": "comment",
"creation_timestamp": "2023-10-11 12:53:15",
"latest_child_timestamp": null,
"object_type": "deckCard",
"object_id": "77",
"reference_id": null,
"reactions": null,
"expire_date": null
}
​
https://redd.it/17kf8mk
@r_bash
I have a very large JSON file.
Inside that JSON file I am only interested in the data that exists with a certain value in one of the indexes within that array.
I am trying to figure out how to use JQ to export the complete datasets where
object_type="deckCard" in each dataset of the array. Example output desired:
{
"id": "651",
"parent_id": "0",
"topmost_parent_id": "0",
"children_count": "0",
"actor_type": "users",
"actor_id": "alec",
"message": "Please advise on whether I may need to edit down these bios.",
"verb": "comment",
"creation_timestamp": "2023-10-11 12:52:56",
"latest_child_timestamp": null,
"object_type": "deckCard",
"object_id": "77",
"reference_id": null,
"reactions": null,
"expire_date": null
},
{
"id": "652",
"parent_id": "0",
"topmost_parent_id": "0",
"children_count": "0",
"actor_type": "users",
"actor_id": "alec",
"message": "There images have been attached to this card.",
"verb": "comment",
"creation_timestamp": "2023-10-11 12:53:15",
"latest_child_timestamp": null,
"object_type": "deckCard",
"object_id": "77",
"reference_id": null,
"reactions": null,
"expire_date": null
}
​
https://redd.it/17kf8mk
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Need Help with Removing Files Using Bash Script
​
For some reason, this removes the bash_file when I run bash_file itself.
I'm trying to remove files in a directory that have a size of zero. I'm not sure why it doesn't work properly.
https://redd.it/17kagkx
@r_bash
if [[ $# -eq 0 ]]; then # if user doesn't enter anything, default to pwddir=$(pwd)elif [[ -d "$1" ]]; then #if the user enters a directory that exists assign to dirdir=$1elseecho "usage: bash_file.sh <directory>" #otherwise, tell the user to enter a valid directoryexit 1 # exit programfi​
for x in "$dir"/*; do #goes through and finds the files of size 0if [[ -s "$x" ]]; thenrm "$x"fidoneFor some reason, this removes the bash_file when I run bash_file itself.
I'm trying to remove files in a directory that have a size of zero. I'm not sure why it doesn't work properly.
https://redd.it/17kagkx
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Minimalistic Bash noscript to fuzzy search and open chrome bookmarks from cli
Hello bash fellows,
I was a bit annoyed by reopening my frequently used bookmarks in Chrome. I added an extension called Quickmarks but don't like it that much. I want to be faster. And I want to have fuzzy search.
Hence, I decided to create a noscript that fetches all my bookmarks from the file system and opens a fuzzy search session on the bookmark noscripts. On selection, it opens the related url in Chrome.
https://preview.redd.it/27veeg13pixb1.png?width=2002&format=png&auto=webp&s=01c3597ecbb7e8a981fae8723c44c9250fc2a600
It works pretty well. What do you think? What is your workaround for this?
Link to the noscript 👉 https://github.com/fynnfluegge/mydotfiles/blob/main/.noscripts/fzfbookmarks.sh
https://redd.it/17ki4lp
@r_bash
Hello bash fellows,
I was a bit annoyed by reopening my frequently used bookmarks in Chrome. I added an extension called Quickmarks but don't like it that much. I want to be faster. And I want to have fuzzy search.
Hence, I decided to create a noscript that fetches all my bookmarks from the file system and opens a fuzzy search session on the bookmark noscripts. On selection, it opens the related url in Chrome.
https://preview.redd.it/27veeg13pixb1.png?width=2002&format=png&auto=webp&s=01c3597ecbb7e8a981fae8723c44c9250fc2a600
It works pretty well. What do you think? What is your workaround for this?
Link to the noscript 👉 https://github.com/fynnfluegge/mydotfiles/blob/main/.noscripts/fzfbookmarks.sh
https://redd.it/17ki4lp
@r_bash
Custom waybar module for controlling gamma
Howdy folks! I'm very new to bash noscripting and just wrote a couple noscripts to control the temperature of my laptop's display from my bar. I wanted to put this somewhere in case it was useful to someone or there was a better way to do it. Right now there are a couple values that I want to be stored between instances of the noscripts and I'm doing it in files. I wonder if there's a better way to do this that doesn't require the full absolute path of the files? Like if I can refer to the noscript's location in the file system?
Sorry if this question is super noobish, even a project this simple that's just a wrapper around someone else's code wasn't easy for me! So I appreciate any help I can get.
https://github.com/frolickingpotato/waybar-gammastep/blob/main/README.md
https://redd.it/17kqxsy
@r_bash
Howdy folks! I'm very new to bash noscripting and just wrote a couple noscripts to control the temperature of my laptop's display from my bar. I wanted to put this somewhere in case it was useful to someone or there was a better way to do it. Right now there are a couple values that I want to be stored between instances of the noscripts and I'm doing it in files. I wonder if there's a better way to do this that doesn't require the full absolute path of the files? Like if I can refer to the noscript's location in the file system?
Sorry if this question is super noobish, even a project this simple that's just a wrapper around someone else's code wasn't easy for me! So I appreciate any help I can get.
https://github.com/frolickingpotato/waybar-gammastep/blob/main/README.md
https://redd.it/17kqxsy
@r_bash
GitHub
waybar-gammastep/README.md at main · frolickingpotato/waybar-gammastep
A gammastep control module for waybar. Contribute to frolickingpotato/waybar-gammastep development by creating an account on GitHub.
Help creating shell noscript for removing embedded subnoscripts from video files
I have a series of video lessons and part of the software leverages an AI assistant to automatically create and embed subnoscripts to the spoken parts. These subnoscripts are not captured and translated perfectly, so I'd like to be able to proofread and update these text files manually.
I have a file (queue.txt) where I list the full path to the video file, such as this:
/Volumes/Lessons/101/lesson1.mkv
/Volumes/Lessons/101/lesson2.mkv
/Volumes/Lessons/101/lesson3.mkv
I'd like to be able to run a shell noscript which takes this list of files and runs the following command against it:
mkvmerge -o <outputfilename> -S <inputfilepath>
The hope is that it outputs the following files in my current directory like this:
lesson1.mkv
lesson2.mkv
lesson3.mkv
Thanks so much in advance. This is not my area of expertise but I have a very large number of video lessons that I'm trying to make available for these students and ensure that subnoscripts are available for accessibility reasons.
https://redd.it/17krvyj
@r_bash
I have a series of video lessons and part of the software leverages an AI assistant to automatically create and embed subnoscripts to the spoken parts. These subnoscripts are not captured and translated perfectly, so I'd like to be able to proofread and update these text files manually.
I have a file (queue.txt) where I list the full path to the video file, such as this:
/Volumes/Lessons/101/lesson1.mkv
/Volumes/Lessons/101/lesson2.mkv
/Volumes/Lessons/101/lesson3.mkv
I'd like to be able to run a shell noscript which takes this list of files and runs the following command against it:
mkvmerge -o <outputfilename> -S <inputfilepath>
The hope is that it outputs the following files in my current directory like this:
lesson1.mkv
lesson2.mkv
lesson3.mkv
Thanks so much in advance. This is not my area of expertise but I have a very large number of video lessons that I'm trying to make available for these students and ensure that subnoscripts are available for accessibility reasons.
https://redd.it/17krvyj
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Sed noscripting help
I want to modify paths explicitly written in files to remove one case of ../
For example:
Somedir/../../hw
Somedir/../../../sw
now becomes after using the sed
Somedir/../hw
Somedir/../../sw
I know for certain the ../ will be in between a known directory name (Somedir in this ex) and a folder with some name (hw and sw in this ex).
Please help anyone with this.
https://redd.it/17l3qjn
@r_bash
I want to modify paths explicitly written in files to remove one case of ../
For example:
Somedir/../../hw
Somedir/../../../sw
now becomes after using the sed
Somedir/../hw
Somedir/../../sw
I know for certain the ../ will be in between a known directory name (Somedir in this ex) and a folder with some name (hw and sw in this ex).
Please help anyone with this.
https://redd.it/17l3qjn
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Sed How to uncomment two lines in a file
Let's say I have a very long configuration file, and in it there's the following lines:
What is the Sed command that will uncomment those lines, so that the output will be:
https://redd.it/17l6cc2
@r_bash
Let's say I have a very long configuration file, and in it there's the following lines:
/etc/animals.conf
-----------------
#[cats]
#Include = /etc/cats.d/listofcats
What is the Sed command that will uncomment those lines, so that the output will be:
/etc/animals.conf
-----------------
[cats]
Include = /etc/cats.d/listofcats
https://redd.it/17l6cc2
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Minimalistic Bash noscript to fuzzy search and open chrome bookmarks from cli
Hello bash fellows,
I was a bit annoyed by reopening my frequently used bookmarks in Chrome. I added an extension called Quickmarks but don't like it that much. I want to be faster. And I want to have fuzzy search.
Hence, I decided to create a noscript that fetches all my bookmarks from the file system and opens a fuzzy search session on the bookmark noscripts. On selection, it opens the related url in Chrome.
https://preview.redd.it/b8lshwkl5pxb1.png?width=2002&format=png&auto=webp&s=f384841958dd466c45ac468c77d7707f30f2ff66
It works pretty well. What do you think? What is your workaround for this?
Link to the noscript 👉 https://github.com/fynnfluegge/mydotfiles/blob/main/.noscripts/fzfbookmarks.sh
https://redd.it/17l7gzt
@r_bash
Hello bash fellows,
I was a bit annoyed by reopening my frequently used bookmarks in Chrome. I added an extension called Quickmarks but don't like it that much. I want to be faster. And I want to have fuzzy search.
Hence, I decided to create a noscript that fetches all my bookmarks from the file system and opens a fuzzy search session on the bookmark noscripts. On selection, it opens the related url in Chrome.
https://preview.redd.it/b8lshwkl5pxb1.png?width=2002&format=png&auto=webp&s=f384841958dd466c45ac468c77d7707f30f2ff66
It works pretty well. What do you think? What is your workaround for this?
Link to the noscript 👉 https://github.com/fynnfluegge/mydotfiles/blob/main/.noscripts/fzfbookmarks.sh
https://redd.it/17l7gzt
@r_bash
Script doesnt fully work
Hello guys
So because of the recent decision of youtube making people not be able to watch ad-free videos with adblocker extension, I wanted to create an noscript so that I can watch videos with mpv. The issue I have with mpv is that the it doesnt buffer fast enough for me. So I wanted to combine yt-dlp with mpv.
Now my noscript is ready but it has an issue. It works when I run each command from the noscript on my own with the terminal. But when running the noscript via bash y.bash, it doesnt perform the last command.
This is my noscript:
url=$(xsel -bo)
filename=$(shuf -i 1-10000000 -n 1)
fileextension="webm"
yt-dlp -o - "$url" | mpv --input-ipc-server=/tmp/mpvsocket - &
yt-dlp -o "/home/reddituser/Downloads/yt-dlp/$filename.$fileextension" "$url" && fullname="/home/reddituser/Downloads/yt-dlp/${filename}.${fileextension}"
timestamp=\"$(echo '{ "command": "get_property", "time-pos" }' | socat - /tmp/mpvsocket | jq -r '.data' | awk '{printf "%.6f\n", $1}')\"
echo $timestamp
echo '{ "command": "loadfile", "'"$fullname"'" }' | socat - /tmp/mpvsocket
echo "{ \"command\": \"set\", \"time-pos\", $timestamp }" | socat - /tmp/mpvsocket
The is the last command, that doesnt work
echo "{ \"command\": \"set\", \"time-pos\", $timestamp }" | socat - /tmp/mpvsocket
This is how the noscript works:
1. variable "$url" is set to the value of clipboard
2. generate random filename
3. set webm as file extension
4. download (from $url) temporarily a 720p video with yt-dlp and directly pipe it to mpv, mpv directly plays the 720p video, also uses IPC so that I can get some values, make it run in the background with "&"
5. Download a high quality version (from $url), and save it to my location with the filename being $filename.$fileextension, wait until done and then set the variable $fullname for the fullpath&fullname
6. Value of $timestamp equals the current timestamp of the 720p video playing, example \\"RANDOM_FLOATIANG_POINT\\" or \\"23.23953\\"
7. Yes It needs to be escaped with \\"
8. replace the current 720p video playing with the new high resolution downloaded video
9. Set the timestamp for the high resolution video to the one of 720p had right before it got replaced
Now the issue is command 9 doesnt work.
I get this error: {"request_id":0,"error":"error running command"}
The reason for this noscript is to directly watch the youtube video and replace it as soon as possible with a high resolution one that got downloaded, this way I can seek very fast without buffering and I am not anymore reliant on youtube.
​
https://redd.it/17lr9m5
@r_bash
Hello guys
So because of the recent decision of youtube making people not be able to watch ad-free videos with adblocker extension, I wanted to create an noscript so that I can watch videos with mpv. The issue I have with mpv is that the it doesnt buffer fast enough for me. So I wanted to combine yt-dlp with mpv.
Now my noscript is ready but it has an issue. It works when I run each command from the noscript on my own with the terminal. But when running the noscript via bash y.bash, it doesnt perform the last command.
This is my noscript:
url=$(xsel -bo)
filename=$(shuf -i 1-10000000 -n 1)
fileextension="webm"
yt-dlp -o - "$url" | mpv --input-ipc-server=/tmp/mpvsocket - &
yt-dlp -o "/home/reddituser/Downloads/yt-dlp/$filename.$fileextension" "$url" && fullname="/home/reddituser/Downloads/yt-dlp/${filename}.${fileextension}"
timestamp=\"$(echo '{ "command": "get_property", "time-pos" }' | socat - /tmp/mpvsocket | jq -r '.data' | awk '{printf "%.6f\n", $1}')\"
echo $timestamp
echo '{ "command": "loadfile", "'"$fullname"'" }' | socat - /tmp/mpvsocket
echo "{ \"command\": \"set\", \"time-pos\", $timestamp }" | socat - /tmp/mpvsocket
The is the last command, that doesnt work
echo "{ \"command\": \"set\", \"time-pos\", $timestamp }" | socat - /tmp/mpvsocket
This is how the noscript works:
1. variable "$url" is set to the value of clipboard
2. generate random filename
3. set webm as file extension
4. download (from $url) temporarily a 720p video with yt-dlp and directly pipe it to mpv, mpv directly plays the 720p video, also uses IPC so that I can get some values, make it run in the background with "&"
5. Download a high quality version (from $url), and save it to my location with the filename being $filename.$fileextension, wait until done and then set the variable $fullname for the fullpath&fullname
6. Value of $timestamp equals the current timestamp of the 720p video playing, example \\"RANDOM_FLOATIANG_POINT\\" or \\"23.23953\\"
7. Yes It needs to be escaped with \\"
8. replace the current 720p video playing with the new high resolution downloaded video
9. Set the timestamp for the high resolution video to the one of 720p had right before it got replaced
Now the issue is command 9 doesnt work.
I get this error: {"request_id":0,"error":"error running command"}
The reason for this noscript is to directly watch the youtube video and replace it as soon as possible with a high resolution one that got downloaded, this way I can seek very fast without buffering and I am not anymore reliant on youtube.
​
https://redd.it/17lr9m5
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
unexpected bash code behavior: won't total up numbers
I'm having trouble understanding why the bash program exits when the user enters integers.
total=0 # keeps track of the running total
# while the number of arguments isn't zero
# and the argument is an integer,
# add to the integer to the running total
# move to the next argument and check
# it against the req's (i.e. integer?)
while [ $# -gt 0 && $1 =~ ^-?[0-9+$ ]]; do
total=$((total + $1))
shift
done
# if the user entered something other than an
# integer or entered nothing at all
# display the error message "this program...."
if ! [ $1 =~ ^-?[0-9+$]]; then
echo "program only accepts integers"
echo "usage: $0 integer 1 integer 2 ... integer x"
exit
fi
# lastly, display the total
echo $total
I can't spot the error...
https://redd.it/17lsfnf
@r_bash
I'm having trouble understanding why the bash program exits when the user enters integers.
total=0 # keeps track of the running total
# while the number of arguments isn't zero
# and the argument is an integer,
# add to the integer to the running total
# move to the next argument and check
# it against the req's (i.e. integer?)
while [ $# -gt 0 && $1 =~ ^-?[0-9+$ ]]; do
total=$((total + $1))
shift
done
# if the user entered something other than an
# integer or entered nothing at all
# display the error message "this program...."
if ! [ $1 =~ ^-?[0-9+$]]; then
echo "program only accepts integers"
echo "usage: $0 integer 1 integer 2 ... integer x"
exit
fi
# lastly, display the total
echo $total
I can't spot the error...
https://redd.it/17lsfnf
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
TIL bash -c takes up to 2 arguments
I expected
On the other hand
In man page I found this:
-c
If the -c option is present, then commands are read from the
first non-option argument commandstring. **If there are arguments after the commandstring, the first argument is assigned
to $0 and any remaining arguments are assigned to the positional parameters. The assignment to $0 sets the name of the
shell, which is used in warning and error messages.
Did you know this?
https://redd.it/17lxfr9
@r_bash
I expected
bash -c 'echo "[$@]"' 10 20 30 to print 10 20 30 but surprisingly it only showed 20 30.On the other hand
bash -c 'echo "[$0 $@]"' 10 20 30 prints 10 20 30.In man page I found this:
-c
If the -c option is present, then commands are read from the
first non-option argument commandstring. **If there are arguments after the commandstring, the first argument is assigned
to $0 and any remaining arguments are assigned to the positional parameters. The assignment to $0 sets the name of the
shell, which is used in warning and error messages.
Did you know this?
https://redd.it/17lxfr9
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Troubles when quoting grep statement for array
Hey all!
The idea is to get an array of space-separated colors from a global config file. This works but shellcheck keeps complaining about the $1 var not being quoted. However when I single quote it the variable isn't expanded.
I'm sure I'm missing something obvious but as I'm quite new to this I'm struggling to see what.
I hope someone can help!
https://redd.it/17m9bjb
@r_bash
Hey all!
The idea is to get an array of space-separated colors from a global config file. This works but shellcheck keeps complaining about the $1 var not being quoted. However when I single quote it the variable isn't expanded.
read -ra hexCols <<< "$(grep ^$1 $mainConf | cut -d: -f2 | xargs)"I'm sure I'm missing something obvious but as I'm quite new to this I'm struggling to see what.
I hope someone can help!
https://redd.it/17m9bjb
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
line counting plugin
Hey people,
I've created a plugin that I want to share with you.
Here's the link: https://github.com/Nelliguns/line-counter-tmux
The reason for creating this plugin is that I received the question of how many lines of code it took to create a specific project of mine where I then started going through the different files and roughly summing them in my head. Which then sparked the idea of making this plugin.
Give it a try and let me now what you think, happy to receive feedback and ideas of improvements.
Hope you like it :)
https://redd.it/17mcp7b
@r_bash
Hey people,
I've created a plugin that I want to share with you.
Here's the link: https://github.com/Nelliguns/line-counter-tmux
The reason for creating this plugin is that I received the question of how many lines of code it took to create a specific project of mine where I then started going through the different files and roughly summing them in my head. Which then sparked the idea of making this plugin.
Give it a try and let me now what you think, happy to receive feedback and ideas of improvements.
Hope you like it :)
https://redd.it/17mcp7b
@r_bash
GitHub
GitHub - Nelliguns/line-counter-tmux
Contribute to Nelliguns/line-counter-tmux development by creating an account on GitHub.
Veriphone API for Laravel applications.
Veriphone API is a REST based JSON API. It provides a set of stateless endpoints that any program or web browser can call by sending a standard HTTP request. Veriphone will respond with a standard HTTP response carrying a JSON payload. This documentation describes these endpoints, their input/output parameters and authentication methods.
​
https://github.com/slvler/veriphone-service
https://redd.it/17mhvhb
@r_bash
Veriphone API is a REST based JSON API. It provides a set of stateless endpoints that any program or web browser can call by sending a standard HTTP request. Veriphone will respond with a standard HTTP response carrying a JSON payload. This documentation describes these endpoints, their input/output parameters and authentication methods.
​
https://github.com/slvler/veriphone-service
https://redd.it/17mhvhb
@r_bash
GitHub
GitHub - slvler/veriphone-service: veriphone.io service
veriphone.io service . Contribute to slvler/veriphone-service development by creating an account on GitHub.
Usernames from other files
Say I had a text file of usernames and in another bash noscript I needed to use those usernames for it to advance how would I make that so it basically Denys access if the username is not in the other file
https://redd.it/17mttty
@r_bash
Say I had a text file of usernames and in another bash noscript I needed to use those usernames for it to advance how would I make that so it basically Denys access if the username is not in the other file
https://redd.it/17mttty
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Batch rename files
I have a bunch of files that have long names.
The beginning part of the name is the same of everyfile, so what I want to do is batch rename all the files to remove the beginning section.
Is there a quick and easy way...
Say the files are called
Video Tutorial - Grade 11 - Lesson 1 - Introduction.mp4Video Tutorial - Grade 11 - Lesson 2 - Basics.mp4
I want the files to be named
Lesson 1 - Introduction.mp4
Lesson 2 - Basics.mp4
https://redd.it/17n96kr
@r_bash
I have a bunch of files that have long names.
The beginning part of the name is the same of everyfile, so what I want to do is batch rename all the files to remove the beginning section.
Is there a quick and easy way...
Say the files are called
Video Tutorial - Grade 11 - Lesson 1 - Introduction.mp4Video Tutorial - Grade 11 - Lesson 2 - Basics.mp4
I want the files to be named
Lesson 1 - Introduction.mp4
Lesson 2 - Basics.mp4
https://redd.it/17n96kr
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community