Error: Value too great for base
Hey everyone, I wrote a bash noscript that is suppose to automate the creation of an AWS resource (specifically the noscript helps to create EBS snapshots).
Volume_map takes the volume IDs, which is a required credential to create the snapshot.
But when i run the noscript I get an error
https://redd.it/165l5ut
@r_bash
Hey everyone, I wrote a bash noscript that is suppose to automate the creation of an AWS resource (specifically the noscript helps to create EBS snapshots).
Volume_map takes the volume IDs, which is a required credential to create the snapshot.
volume_map["vol-0b235e5983aae1aef"]="Folder1" volume_map["vol-050ec02d0a7d2288b"]="Folder2"But when i run the noscript I get an error
./create_snapshot.sh: line 5: vol-050ec02d0a7d2288b: value too great for base (error token is "050ec02d0a7d2288b")https://redd.it/165l5ut
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
can only read out last thing added to array
function arraystest {
declare -a itemtype
declare -a itemname
declare -a seasonnumber
declare -a episodenumber
echo "num: ${num}"
echo -e
read -p -r "what type of item? " itemtype${num}
echo -e
read -p "name of item? " itemname[${num}]
echo -e
read -p "season number? " seasonnumber${num}
echo -e
read -p "episode number? " episodenumber[${num}]
echo -e
(( num++ ))
if (($num > 2))
then clearprintout
else arraystest
fi
}
function clearprintout {
clear
printout
}
function dump {
echo "string number 0 : ${itemtype0} ${itemname[0]} ${seasonnumber0} ${episodenumber[0]}"
echo "string number 1 : ${itemtype1} ${itemname[1]} ${seasonnumber1} ${episodenumber[1]}"
echo "string number 2 : ${itemtype2} ${itemname[2]} ${seasonnumber2} ${episodenumber[2]}"
echo -e
echo "itemtype: ${itemtype[*]}"
}
function printout {
echo "printnum: ${printnum}"
echo -e
echo "string number ${printnum} : ${itemtype[${printnum}]} ${itemname${printnum}} ${seasonnumber[${printnum}]} ${episodenumber${printnum}}"
(( printnum++ ))
if (($printnum > 2))
then dump
else printout
fi
}
# main
num=0
printnum=0
arraystest
This code is meant to ask a set of four questions, with the answer to each question going in an array. It's meant to do this three times, then print them out.
As far as I can tell, it's throwing away previous answers and keeping only the last one.
Where am I going wrong?
https://redd.it/165jifv
@r_bash
function arraystest {
declare -a itemtype
declare -a itemname
declare -a seasonnumber
declare -a episodenumber
echo "num: ${num}"
echo -e
read -p -r "what type of item? " itemtype${num}
echo -e
read -p "name of item? " itemname[${num}]
echo -e
read -p "season number? " seasonnumber${num}
echo -e
read -p "episode number? " episodenumber[${num}]
echo -e
(( num++ ))
if (($num > 2))
then clearprintout
else arraystest
fi
}
function clearprintout {
clear
printout
}
function dump {
echo "string number 0 : ${itemtype0} ${itemname[0]} ${seasonnumber0} ${episodenumber[0]}"
echo "string number 1 : ${itemtype1} ${itemname[1]} ${seasonnumber1} ${episodenumber[1]}"
echo "string number 2 : ${itemtype2} ${itemname[2]} ${seasonnumber2} ${episodenumber[2]}"
echo -e
echo "itemtype: ${itemtype[*]}"
}
function printout {
echo "printnum: ${printnum}"
echo -e
echo "string number ${printnum} : ${itemtype[${printnum}]} ${itemname${printnum}} ${seasonnumber[${printnum}]} ${episodenumber${printnum}}"
(( printnum++ ))
if (($printnum > 2))
then dump
else printout
fi
}
# main
num=0
printnum=0
arraystest
This code is meant to ask a set of four questions, with the answer to each question going in an array. It's meant to do this three times, then print them out.
As far as I can tell, it's throwing away previous answers and keeping only the last one.
Where am I going wrong?
https://redd.it/165jifv
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Can someone explain these wildcards with my shell expansions?
So then I tried
I'm not sure why these wildcards are making my search results more restrictive than not having them in the first place.
https://redd.it/165x09z
@r_bash
locate /bin/zip - This command works (and outputs files like usr/bin/zipgrep, etc) but I thought there was an implicit wildcard like this locate */bin/zipand that's why it locates all the directories that house /bin/zipSo then I tried
locate "*/bin/zip". No output... if usr/bin/zipgrep matched with command locate /bin/zip, why wouldn't anything appear in the output for locate "*/bin/zip"?locate "/bin/*zip*" - This command also does not work but I'm thinking it should because the wildcards loosen up the search parameter.I'm not sure why these wildcards are making my search results more restrictive than not having them in the first place.
https://redd.it/165x09z
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Eases that make writing Bash code easier?
It's been a while since I write bash noscripts (around 1 year) and the environment is always the same: the so well known and always used - for me \- in its most basic essence VIM. VIM is so settled in me that it took a really long process to write C code on VSCode instead of VIM. However, I do not intend to leave VIM and I suppose that many of you guys write your bash noscripts through this editor.
Therefore, I'd like to know from you things that you have plugged in (and consider indispensable nowadays) on the editor so that writing bash code turned easier. It can be anything like, for example, autocomplete. If it's not a pain for you, it'd be nice to know how to implement this feature on someone's else machine, so feel free to throw links too!
https://redd.it/166oo3d
@r_bash
It's been a while since I write bash noscripts (around 1 year) and the environment is always the same: the so well known and always used - for me \- in its most basic essence VIM. VIM is so settled in me that it took a really long process to write C code on VSCode instead of VIM. However, I do not intend to leave VIM and I suppose that many of you guys write your bash noscripts through this editor.
Therefore, I'd like to know from you things that you have plugged in (and consider indispensable nowadays) on the editor so that writing bash code turned easier. It can be anything like, for example, autocomplete. If it's not a pain for you, it'd be nice to know how to implement this feature on someone's else machine, so feel free to throw links too!
https://redd.it/166oo3d
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Beginner needs help with a short AWK function
Hi all. I'm trying to create a short bash noscript to assist me at work. I want to take the output of a command (which displays the install history of a server). Here is an example of what typical output of the history command looks like:
(install command)<machine name>
(machine name) | (install date) | (install time) | (install log id number) | (install status)
​
The (install status) field can be either "Successful" or "Failed".
I want to change the color and also make the text bold for both the first and last fields. But I want to specifically only change the font color in the last field to green if the last field contains the word "Successful" and if it contains the word "Failed" I want the font color for the last field to be red.
Then I want to display the entire output of the install command with the modified first and last fields pasted in.
So the goal output would look like:
(machine name in blue font color + bold) | (install date) | (install time) | (install log id number) | (install status ("Successful" <-- Green font or "Failed" <-- Red font) |
I have gotten this to work but it is a horrible way of doing it, it's about 100 lines of code. I think the command I really need to be using is awk(match) but I cannot find good guides on how to use it. I was able to get it to work to replace a certain word with another word, but I don't know how to use awk + match to change the font formatting like color and bold. Thank you to anyone who can help!!
https://redd.it/166sdag
@r_bash
Hi all. I'm trying to create a short bash noscript to assist me at work. I want to take the output of a command (which displays the install history of a server). Here is an example of what typical output of the history command looks like:
(install command)<machine name>
(machine name) | (install date) | (install time) | (install log id number) | (install status)
​
The (install status) field can be either "Successful" or "Failed".
I want to change the color and also make the text bold for both the first and last fields. But I want to specifically only change the font color in the last field to green if the last field contains the word "Successful" and if it contains the word "Failed" I want the font color for the last field to be red.
Then I want to display the entire output of the install command with the modified first and last fields pasted in.
So the goal output would look like:
(machine name in blue font color + bold) | (install date) | (install time) | (install log id number) | (install status ("Successful" <-- Green font or "Failed" <-- Red font) |
I have gotten this to work but it is a horrible way of doing it, it's about 100 lines of code. I think the command I really need to be using is awk(match) but I cannot find good guides on how to use it. I was able to get it to work to replace a certain word with another word, but I don't know how to use awk + match to change the font formatting like color and bold. Thank you to anyone who can help!!
https://redd.it/166sdag
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Difference between \( and "(
There's this example in the book I'm reading
https://redd.it/166urz2
@r_bash
There's this example in the book I'm reading
find /etc \( -type d -not -perm 0777 \). So I understand the backslashes are escaping the parenthesis creating the group but then I wanted to try find /etc "( -type d -not -perm 0777 )" but it gives different results. Don't the quotes also escape the parenthesis?https://redd.it/166urz2
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Efficiently replace a substring within a string
I want to replace a substring within a string. Is there a way, maybe with awk, to just replace the, let's say, second substring with another string? Something like replace $2 of variable1 with $substring (or "substring"). This would be very convenient, this way I could skip the step to grep the actual substring in the variable and then replace this string for the new string, e.g. with sed.
https://redd.it/167cck1
@r_bash
I want to replace a substring within a string. Is there a way, maybe with awk, to just replace the, let's say, second substring with another string? Something like replace $2 of variable1 with $substring (or "substring"). This would be very convenient, this way I could skip the step to grep the actual substring in the variable and then replace this string for the new string, e.g. with sed.
https://redd.it/167cck1
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Bash Scripting
Any resources to keep noscripts syntax skills sharp or advance them?
I've done a few courses on pluralsight but I don't often find myself noscripting much at work (I am in INFO SEC but most of our tools are already written) and with almost every coding I've tried to learn I will undoubtedly forget everything I've learned if I don't reinforce the skills for awhile.
Thank you.
https://redd.it/167h9z9
@r_bash
Any resources to keep noscripts syntax skills sharp or advance them?
I've done a few courses on pluralsight but I don't often find myself noscripting much at work (I am in INFO SEC but most of our tools are already written) and with almost every coding I've tried to learn I will undoubtedly forget everything I've learned if I don't reinforce the skills for awhile.
Thank you.
https://redd.it/167h9z9
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
is it possible to count the number of rows printed to in the terminal?
I'm working on a program that takes the size of the terminal into account. So far, I've got it adapting all the text output to the width, no problem at all.
The design of the program prints a bunch of text to the top of the screen, has a space, then prints some more at the bottom. (That space will be replaced later on with a table of data)
The blank space should be the bit that scales to fit vertically. I could cheat, and set something up with a fixed variable for the top and bottom half. But I was hoping for something robust that could handle any changes I might add to the top.
So, what I want to know is, is there a way to cook up a function that will count the number of terminal rows (top to bottom) that have been written to at the point it's envoked?
Say my program runs:
clear
echo "first line"
echo "second line"
echo "third line"
magicnumber linecount
echo "fourth line"
magicnumber runs and makes $linecount=3. It doesn't make it 4 because the fourth hadn't happened when it was envoked.
possible?
https://redd.it/167jfs4
@r_bash
I'm working on a program that takes the size of the terminal into account. So far, I've got it adapting all the text output to the width, no problem at all.
The design of the program prints a bunch of text to the top of the screen, has a space, then prints some more at the bottom. (That space will be replaced later on with a table of data)
The blank space should be the bit that scales to fit vertically. I could cheat, and set something up with a fixed variable for the top and bottom half. But I was hoping for something robust that could handle any changes I might add to the top.
So, what I want to know is, is there a way to cook up a function that will count the number of terminal rows (top to bottom) that have been written to at the point it's envoked?
Say my program runs:
clear
echo "first line"
echo "second line"
echo "third line"
magicnumber linecount
echo "fourth line"
magicnumber runs and makes $linecount=3. It doesn't make it 4 because the fourth hadn't happened when it was envoked.
possible?
https://redd.it/167jfs4
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Potential incompatible change to printf's '%b' format specifier
The people coming up with the next C language standard are proposing new
The section of the Bash manual describing the builtin
However, the Bash builtin
A number of people from the Austin Group, the people behind the POSIX specification, emailed in to the bug-bash email list, where Bash development discussion takes place, saying that they would like a new POSIX standard to change the mandated behavior of the
Chet Ramey, the Bash maintainer, really wasn't having it:
> I don't have a problem adding %#s. I have a problem with POSIX not seeing that the printf builtin is not a direct parallel to the library function and forcing an incompatible change.
So, do noscripts you write or maintain use the
https://redd.it/167pnkt
@r_bash
The people coming up with the next C language standard are proposing new
printf() format specifiers %b and %B, to output integers as binary literals, i.e. 0b00010110, the binary representation of 22.The section of the Bash manual describing the builtin
printf command references the manual for the external printf program, printf(1); which itself references the manual for the C function printf(), printf(3). The Bash builtin printf command supports a bunch of C-language printf() format specifiers, so they just direct you to that documentation to see how those work.However, the Bash builtin
printf supports additional format specifiers, beyond those supported by the C-language printf(). One of those is %b, which in the case of Bash's printf, currently "causes printf to expand backslash escape sequences in the corresponding argument in the same way as echo -e."A number of people from the Austin Group, the people behind the POSIX specification, emailed in to the bug-bash email list, where Bash development discussion takes place, saying that they would like a new POSIX standard to change the mandated behavior of the
%b format specifier used by the command-line printf command, whether that's an external program or the Bash builtin, to mirror the behavior of this format specifier as used by the C printf() function in the upcoming C standard. They are recommending %#s, signifying an alternative string format, to take over the duties of the current %b. They do seem to be saying that they'd only change the standard in this way if they get buy-in from shell authors, though.Chet Ramey, the Bash maintainer, really wasn't having it:
> I don't have a problem adding %#s. I have a problem with POSIX not seeing that the printf builtin is not a direct parallel to the library function and forcing an incompatible change.
So, do noscripts you write or maintain use the
%b printf format specifier? What's your take on all this?https://redd.it/167pnkt
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Is there a keyboard shortcut to navigate through to the next or previous whitespace?
If I have a string,
Is there a way to jump from whitespace to whitespace ( and allow me to delete the word between the two whitespaces)?
https://redd.it/167r3q7
@r_bash
If I have a string,
sdf df ddg'dfgd fg'dgffgms...dfdsg re rg./ert re/tr.et/ret/rtr, in the commandline and I press alt + b or alt + f, it only transverses to the next nonletter symbol (.,/ etc).Is there a way to jump from whitespace to whitespace ( and allow me to delete the word between the two whitespaces)?
https://redd.it/167r3q7
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Drop your favorite .bash_profile line and we will create a badass config
https://redd.it/168dzuh
@r_bash
https://redd.it/168dzuh
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
How to send password to redis-cli , perform the login and keep redis-cli open with a bash noscript?
#!/usr/bin/env bash
# Unofficial Bash Strict Mode
set -e
set -E
set -o pipefail
set -u
set -x
IFS=$'\n\t'
# End of Unofficial Bash Strict Mode
host="localhost"
password="somepassword"
port="6379"
db="0"
redis-cli -h "${host}" -p "${port}" -n "${db}"
# HOW TO send AUTH command with password and keep the redis-cli OPEN?
https://redd.it/168rqbs
@r_bash
#!/usr/bin/env bash
# Unofficial Bash Strict Mode
set -e
set -E
set -o pipefail
set -u
set -x
IFS=$'\n\t'
# End of Unofficial Bash Strict Mode
host="localhost"
password="somepassword"
port="6379"
db="0"
redis-cli -h "${host}" -p "${port}" -n "${db}"
# HOW TO send AUTH command with password and keep the redis-cli OPEN?
https://redd.it/168rqbs
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Please tell me why running cat returns contents but running cat within echo or printf statements it says the file doesn't exits
This command works:
docker exec --user root myapp cat admin/password
output:
KMZWaE2r81b(cT5x&(S7Wg7CJ
When I run it like this:
docker exec --user root myapp echo "ADMIN PASSWORD: " && "$(cat admin/password)"
output:
ADMIN PASSWORD:
cat: admin/password: No such file or directory
I attempted with printf as well:
docker exec --user root myapp printf "ADMIN PASSWORD: \"%s\"", "$(cat admin/password)"
output:
cat: admin/password: No such file or directory
At this point I am extremely confused why this is happening.
https://redd.it/1690klv
@r_bash
This command works:
docker exec --user root myapp cat admin/password
output:
KMZWaE2r81b(cT5x&(S7Wg7CJ
When I run it like this:
docker exec --user root myapp echo "ADMIN PASSWORD: " && "$(cat admin/password)"
output:
ADMIN PASSWORD:
cat: admin/password: No such file or directory
I attempted with printf as well:
docker exec --user root myapp printf "ADMIN PASSWORD: \"%s\"", "$(cat admin/password)"
output:
cat: admin/password: No such file or directory
At this point I am extremely confused why this is happening.
https://redd.it/1690klv
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Why is this noscript not working to print the logs between two time duration?
LC_ALL=C awk -v beg=10:00:00 -v end=13:00:00 '
match($0, /[0-2][0-9]:[0-5][0-9]:[0-5][0-9]/) {
t = substr($0, RSTART, 8)
if (t >= end) selected = 0
else if (t >= beg) selected = 1
}
selected'
Why do you think is this not working in some servers, whereas working in some servers?
I invoke it as
bash noscript.sh application.log
https://redd.it/16920u2
@r_bash
LC_ALL=C awk -v beg=10:00:00 -v end=13:00:00 '
match($0, /[0-2][0-9]:[0-5][0-9]:[0-5][0-9]/) {
t = substr($0, RSTART, 8)
if (t >= end) selected = 0
else if (t >= beg) selected = 1
}
selected'
Why do you think is this not working in some servers, whereas working in some servers?
I invoke it as
bash noscript.sh application.log
https://redd.it/16920u2
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
How do I find the field names for the output of a command?
Something easy like ls -l, it outputs data but the column name isn't displayed. I looked in man ls but there isn't any information either.
https://redd.it/16939ml
@r_bash
Something easy like ls -l, it outputs data but the column name isn't displayed. I looked in man ls but there isn't any information either.
https://redd.it/16939ml
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Why do I have to escape space or '&' in a character class?
why this is wrong
What special meaning these two have in a character class (or shell) that I have to escape them?
I know '&' is bitwise AND but I mean shell knows this is a character class, it doesn't make sense for the shell to interpret '&' as bitwise AND in a character class. Have no idea about the space though.
https://redd.it/1694sc0
@r_bash
why this is wrong
[ -z] but this [\ -z] is right? same goes for the case of '&'.What special meaning these two have in a character class (or shell) that I have to escape them?
I know '&' is bitwise AND but I mean shell knows this is a character class, it doesn't make sense for the shell to interpret '&' as bitwise AND in a character class. Have no idea about the space though.
https://redd.it/1694sc0
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Is requesting a sudo password via dialog this way unsafe?
I'm practicing my bash noscripting and want to request the user's sudo password using
As I'm new at this I would also appreciate any other suggestions/tips/comments!
Github link to current noscript here
​
I realize that sudo already has its own way of requesting the password, this is just for looks and practice. You could also just run the whole noscript as sudo but that's not the point of this exercise for me.
https://redd.it/1694mp2
@r_bash
I'm practicing my bash noscripting and want to request the user's sudo password using
dialog. Is it unsafe to request the password this way? And if so, how is it unsafe?As I'm new at this I would also appreciate any other suggestions/tips/comments!
Github link to current noscript here
​
I realize that sudo already has its own way of requesting the password, this is just for looks and practice. You could also just run the whole noscript as sudo but that's not the point of this exercise for me.
https://redd.it/1694mp2
@r_bash
GitHub
sudo-from-dialog/dialog-password at 7c436a652d7b96e8d26b54bb6ec44b2d7bcf818c · MajorMuff/sudo-from-dialog
Using the dialog command to get sudo access. Contribute to MajorMuff/sudo-from-dialog development by creating an account on GitHub.
Beginner How do I solve the "/bin/bash: ... No such file or directory"?
Hi!
I'm using Windows and I wrote the following Bash noscript:
```
\#!/bin/bash
cd C:\\Users\\username\\Downloads\\workspace\\project1
.\\venv\\Scripts\\activate
python python_noscript.py "Hello World!"
deactivate
node javanoscript_noscript.js "Hello World!"```
My goal is just to laud both the Python and JavaScript noscripts that just print Hello World!. I was having an issue with not finding the Python command hence the workaround to manually activate the virtual environment.
Now my issue is when I'm in the folder where the file is, my bash_noscript.sh is in "C:\\Users\\username\\Downloads\\workspace\\project1", and in the terminal I do ```bash bash_noscript.sh``` it gives me the following error: "/bin/bash: bash_noscript.sh: No such file or directory".
I tried giving it the absolute path of the bash noscript as well as "/mnt/C:/Users/username/Downloads/workspace/project1" but I get the same error.
I'd be really grateful if someone can help me figure this out. Thank you!
https://redd.it/169qju9
@r_bash
Hi!
I'm using Windows and I wrote the following Bash noscript:
```
\#!/bin/bash
cd C:\\Users\\username\\Downloads\\workspace\\project1
.\\venv\\Scripts\\activate
python python_noscript.py "Hello World!"
deactivate
node javanoscript_noscript.js "Hello World!"```
My goal is just to laud both the Python and JavaScript noscripts that just print Hello World!. I was having an issue with not finding the Python command hence the workaround to manually activate the virtual environment.
Now my issue is when I'm in the folder where the file is, my bash_noscript.sh is in "C:\\Users\\username\\Downloads\\workspace\\project1", and in the terminal I do ```bash bash_noscript.sh``` it gives me the following error: "/bin/bash: bash_noscript.sh: No such file or directory".
I tried giving it the absolute path of the bash noscript as well as "/mnt/C:/Users/username/Downloads/workspace/project1" but I get the same error.
I'd be really grateful if someone can help me figure this out. Thank you!
https://redd.it/169qju9
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
help why is diff taking so long? I just want to compare filenames between 2 folders to look for what's missing and print the differences. No recursion.
I know this shouldn't be that hard. I've definitely check contents of files against another but this is taking a long time. folder A has 100 items. Folder B hash 118. I just want those 18 not included. Like so:
diff /directoryA /directoryB
prints:
+ 18 files missing in /directoyB:
1. taco.txt
2. hello.txt
3. bread.txt
....
However everything I try is going incredible slow. I don't need to read the contents of the files. Just the filenames. I don't need to recursively check folders. Just a text match of the top level file/folder names within the given directory but it takes about 1 minute before it returns the next result.
I've tried these flags with diff: "-q" " "-brief" and "a" to treat as text but it's still to slow. "r" is recursive but it seems like it's doing that reguardless so how to I stop it from checking with folders?
Oh and I even tried this crazy thing:
diff <(find /Volumes/directory1/ -printf '%P\n') \
<(find /Volumes/directory2/ -printf '%P\n')
I could've done it manually by now but I must know how this is done!
https://redd.it/169yi6y
@r_bash
I know this shouldn't be that hard. I've definitely check contents of files against another but this is taking a long time. folder A has 100 items. Folder B hash 118. I just want those 18 not included. Like so:
diff /directoryA /directoryB
prints:
+ 18 files missing in /directoyB:
1. taco.txt
2. hello.txt
3. bread.txt
....
However everything I try is going incredible slow. I don't need to read the contents of the files. Just the filenames. I don't need to recursively check folders. Just a text match of the top level file/folder names within the given directory but it takes about 1 minute before it returns the next result.
I've tried these flags with diff: "-q" " "-brief" and "a" to treat as text but it's still to slow. "r" is recursive but it seems like it's doing that reguardless so how to I stop it from checking with folders?
Oh and I even tried this crazy thing:
diff <(find /Volumes/directory1/ -printf '%P\n') \
<(find /Volumes/directory2/ -printf '%P\n')
I could've done it manually by now but I must know how this is done!
https://redd.it/169yi6y
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community