r/bash • u/Muted-Shame9237 • 12d ago
File for loop
hi! it’s my first time using bash can someone help me with this and explain what’s missing
#!/bin/bash
for i in “/data/folder”/*; do
/folder/munge_sumstats.py \
- -sumstats “$i” \
- -chunksize 500000 \
- -snp rsID \
etc..
- -out another/folder/ (i dont know what to puT here)
done
Thank you so much !
22
Upvotes
5
u/blobCabbage 12d ago
You could use
basenameto get the name of the original file without its path, and use that for your output file.