Got a line of perl that calls a bash wrapper function after it sources .bash_profile
system ('source ~/.bash_profile; osascript -e \'quit app "Chromium"\'');
Although the wrapper function gets called and is executed perfectly fine, I'm getting an error thrown from an unrelated bash function:
/Users/me/.bashrc: line 9: syntax error near unexpected token `<'
/Users/me/.bashrc: line 9: ` done < <(find -L "$1" -type f -not -name *.swp -print0 | LC_COLLATE=C sort -dz)'
This is the problem function in the .bashrc
file:
source_dir() {
while IFS= read -r -d $'\0' file; do
source_file "$file"
done < <(find -L "$1" -type f -not -name *.swp -print0 | LC_COLLATE=C sort -dz)
}
This bash function does not throw errors when sourcing it directly, only when loading it through the Perl script. I'm curious to know why.
I'm running bash version 5.0.2.