The echo
command outputs differing results based on the expression passed to it. The working directory is /home/etc
$ echo .*/
/ ../ .cache/ .config/ .gnupg/ .local/ .mozilla/ .ssh/
$ echo ./*
./Desktop ./Documents ./Downloads ./Music ./Pictures ./Public ./snap ./Templates ./Videos
$ echo .*/*
.cache/event-sound-cache.tdb.d410907cf15246578458d0ad7919eb5e.x86_64-pc-linux-gnu .cache/evolution .cache/fontconfig .cache/gnome-screenshot .cache/gnome-software .cache/gstreamer-1.0 .cache/ibus .cache/ibus-table .cache/libgweather .cache/mesa_shader_cache .cache/mozilla .cache/thumbnails .cache/ubuntu-report .cache/update-manager-core .cache/wallpaper .config/dconf .config/enchant .config/eog .config/evolution .config/gedit .config/gnome-initial-setup-done .config/gnome-session .config/goa-1.0 .config/gtk-3.0 .config/ibus .config/nautilus .config/pulse .config/rclone .config/update-notifier .config/user-dirs.dirs .config/user-dirs.locale ./Desktop ./Documents ./Downloads .gnupg/private-keys-v1.d .gnupg/pubring.kbx .gnupg/trustdb.gpg .local/share .mozilla/extensions .mozilla/firefox .mozilla/systemextensionsdev ./Music ../ec ./Pictures ./Public ./snap ./Templates ./Videos
$ echo */*/
Downloads/sync/ Downloads/testdir/ snap/gnome-calculator/
The aim is to reduce the number of commands to get the output. Can there be a single echo statement that combines the output of echo .*/
and echo ./*
other than echo .*/ */
?
echo .*/ ./*
, is there a better option? If this is considered to be the most effective solution, I'll accept it. – Ryan Jan 14 '20 at 17:41