-
ps| wc -l ;output = 4 processes running in my system
-
Script name time.sh
-
touch empty.txt
-
mkdir -p ~/Work/mini-project/RNA-seq/
-
mv seqs.txt sequences.fasta
-
echo "Hello,world!" > universal_greetings.txt
-
echo "Hello,world!" > "universal greetings.txt"
-
To download a file remotely from github wget --no-check-certificate --content-disposition https://raw.githubusercontent.com/Fnyasimi/my-first-repo/main/directory1/test.fa Alternatively one can use the command; curl -LJO https://raw.githubusercontent.com/Fnyasimi/my-first-repo/main/directory1/test.fa
-
No. of files: wc -l gives the output as 10281 No. of sequences: grep ">" test.fa | wc -l gives 100
-
grep ">" test.fa > identifiers.txt
-
tr A a < test.fa
-
egrep ">" test.fa
-
grep ">" test.fa | cut -d, -f1 | sed 's/PREDICTED://g' | awk '{print $2,$3}'
-
sort -n species.txt | uniq -c |sort -nr
-
A loop to print intergers 1 to 30 ;
>for integers in $(seq 1 30)
>do
> echo $integers
>done
- touch trial{1..20}
#To rename:
>for files in trial{1..20}
>do
>mv $files ${files}.data
>done
-
The command "expr 1 / 0" gives the output; expr:division by zero this is an error message since division by zero is an illegal arithmetic operation.
-
echo output 1>>stdout.log && echo output 2>>stderr.log #The value 1(stdout) and 2(stderr) are file descriptors.
-
script name greetings.sh
-
cd ../../Fun_stuff
-
generator.sh
for i in {0..9}
do
mkdir "$i"
cd "$i"
touch "$i".{0..9}
cd ..
done