从bash脚本输出文件夹
我有bash脚本: 但我不知道如何设置.bed文件的输出文件夹(从脚本输出)从bash脚本输出文件夹,bash,Bash,我有bash脚本: 但我不知道如何设置.bed文件的输出文件夹(从脚本输出) for x in *.bam; do bamToBed -i $x > ${x%.bam}.bed; done ## Define the folder you want to use for .bed files outputFolder=/your/output/folder ## Make sure the folder is created mkdir -p "$outputFolder" f
for x in *.bam;
do bamToBed -i $x > ${x%.bam}.bed;
done
## Define the folder you want to use for .bed files
outputFolder=/your/output/folder
## Make sure the folder is created
mkdir -p "$outputFolder"
for x in *.bam; do
## Redirect the output to a file in the above defined folder
bamToBed -i "$x" > "$outputFolder/${x%.bam}.bed"
done