-2

I tested below is working well on shell. I'd like to update this on spec file. Get filename of all filenames existing inside some folder

for filename in testfolder/*.txt; do
   filename =${filename %.txt}
done
Chris Maes
  • 35,025
  • 12
  • 111
  • 136
N.hwang
  • 207
  • 3
  • 13
  • this should not work with the spaces inside your code... – Chris Maes Jan 07 '20 at 08:50
  • @ChrisMaes, I'd like to wonder how could I uses these types of command inside spec file. It's sample code, I checked it's working well on shell – N.hwang Jan 07 '20 at 08:59
  • your question is not clear. What do you want to do? It depends on where you want to use this in your spec file. – Chris Maes Jan 07 '20 at 09:00
  • Try to give us a real reproducible example: what you want to obtain, what did you try, what output do you get, what output did you expect. – Chris Maes Jan 07 '20 at 09:01

1 Answers1

1

All SPEC sections but %files and preamble are shell scripts. You can use it there without a problem.

msuchy
  • 5,162
  • 1
  • 14
  • 26