You can not move it. I said you can ask me. I did it.
You can not pipe onti a variable.
It does work. It does what you said to do. It redirects the output into the file dirs. Look for the file disr and you will find it.
Now please take note, people here are willing to help you, even with a script. But most people here are not willing to spend some time when youapparently did not even tried to learn shell scripting from a tutorial, book or whatever. We can not hold you by the hand for every single step.
It is also not very productive to just ask about one step where you do not explain what your goal is. A better explanation of this you will find at: How To Ask Questions The Smart Way
for d in "${directories@]}"; do
echo "Directory $d"
done
Note that those above is not recursive, If you want to do a recursive search either enable the shell glob **globstar **](glob - Greg's Wiki)or just use find](http://http://mywiki.wooledge.org/UsingFind)which recursive by default.
Using external commands from the shell.
tree -d -L 1
find . -maxdepth 1 -type d
But tree is just for viewing things or rather just for visual purposes and not for scripting purposes.
Now please take note, people here are willing to help you, even with a script. But most people here are not willing to spend some time when you apparently did not even tried to learn shell scripting from a tutorial, book or whatever. We can not hold you by the hand for every single step.
OUCH! I spent several hours working on a set of test cases and finally caved in with a forum question. Searching the web for answers isn’t that easy because of the syntax changes between flavors of unix and linux. There’s also a big gap between you and someone from the windoz world. Thank you for your help and pointing out gaps in my thinking.
The big picture is I am trying to run a make file.
If the following 2 lines were executed in a makefile, the result is a variable VPATH and not a file, right?
# define the search pathWhat is the result of the above 2 lines?
dirs := $(shell cat Filepath)
VPATH := $(foreach dir $(dirs), $wildcard $(dir))
Where Filepath is a file with directories in it.
This is the starting point for my question.
What is an appropriate re-coding of the 2 lines for openesuse?
Hi
What is the application your trying to compile? Just a little snippet has no context, post the whole Makefile eg https://susepaste.org or provide a link to the source…
For openSUSE? You are talking about make (probably GNU make), which runs on Windows too. I had that in my Windows 95/98 days, together with bash, and what not (DJGPP comes to mind).
Now, on to your problem.
The command info make is your friend. Enter the following command in a shell:
info make
Use the down-arrow key to move the cursor downward, until it is on “* Functions::”. Now press Enter.
Move the cursor down to “* Foreach function::” and press Enter.
On that page is an example that looks pretty much like yours.
They use “files” instead of “VPATH” and have an extra “/*”.