Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 533 Bytes

never_forget_bash.md

File metadata and controls

26 lines (23 loc) · 533 Bytes

Copy from local machine to a remote server

scp myfile.txt remoteuser@remoteserver:/remote/folder/

Run for loop in parallel

parallel --jobs 6 script.sh {} ::: *.bam
# change 6 to more if needed

# Another way:
SAMPLES="X Y Z"
for SAMPLE in $SAMPLES; do 
	process ${SAMPLE} & 
done
wait

Nice

Nice values range from -20 (maximum priority for the process) to 19 (least priority for the process).

# assign priority
nice -n-10 nano file.txt
# change priority (where -p is the PID)
renice -n -10 -p 2343