Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
The appropriate answer is @laktak. But here there's another approach:
for f in *.gz;"$sourceFolder"; do echo "$" printing the file name ${f##*/}"; " done
for f in *.gz; do echo "${f##*/}"; done
for f in "$sourceFolder"; do echo " printing the file name ${f##*/}" done
The appropiateappropriate answer is @laktak (using the extension *.gz). But here there's another approach:
*.gz
for f in *.gz; do echo "${f##f##*/*}"; done
The appropiate answer is @laktak (using the extension *.gz). But here there's another approach:
for f in *.gz; do echo "${f##/*}"; done