Answer the question
In order to leave comments, you need to log in
Is there a function that displays the current directory?
Is there a function that displays the current directory, such as pwd.
The problem is, is it possible to optimize this:
for y in `find / -name "*_test.jpg" `;do
x=`basename $y`
echo ${y:: -${#x}}
done
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then
for y in `find / -name "*_test.jpg" `;do
file=$(basename "$y")
dir=$(dirname "$y")
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question