Aritalab:Lecture/NGS/Shell script

From Metabolomics.JP
Jump to: navigation, search

Bash scripts

Creating files
#!/bin/bash
from=000
to=100
while [ ${from} -lt ${to} ] ; do
 echo "test" > ${from}.txt
 from=$((from+1))
done
exit
Creating serial numbers
#!/bin/bash
num=0
while [ $num -lt 10 ] ; do
 echo $num
 num=$((num+1))
done
exit
Calc tool
#!/bin/bash
eq=$@
eq=$(echo $eq|sed "s/E\(-[0-9]*\)/*10^\1/g")
eq=$(echo $eq|sed "s/\*\*/^/g")
echo $eq|bc -l
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox