0

I found a script that makes a file list. The list looks like this

/home/usr/example_directory
/home/usr/example_directory/file1.txt
/home/usr/example_directory/file2.txt
/home/usr/different_directory
/home/usr/different_directory/file3.txt
/home/usr/different_directory/file4.txt

The script is

wecho "
cat 
   <(find /home/usr/example_directory) 
   <(find /home/usr/different_directory) 
   | bgzip > filelist.txt.gz
"

Within the quotes I think I understand what is happening. Using process substitution to pipe multiple commands to a file and compressing it to filelist, however I don't know what wecho is doing - it doesn't even appear to be a function. Also, why does the pipe needs to be within double quotes?

I've run this in bash and it says wecho command not found, and if you run this with echo instead then it just prints the script to stdout.

3
  • 2
    Check the script for a function called wecho Commented Jul 30, 2021 at 13:46
  • 1
    Sounds like a simple typo in the script. Commented Jul 30, 2021 at 14:00
  • If the script produces that output, then "wecho" exists. Just add whatis wecho before it is executed, and it will tell you. Commented Jul 30, 2021 at 16:20

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.