Bash One liners ¶
- Export Inkscape SVG files to EPS for PLOS journals
- Print only the top 25 reads from a FASTQ file
- Replace FASTQ read name by ascending numbers starting at 0
- Transferring
snapgene
exported primer files to local desktop - Looking for specific primers in
snapgene
exported primer files - Mounting
snapgene
fromserine
onto your local machine - Logging into
serine
and openingsnapgene
- Find absolute links to images in markdown files and replace them with relative links.
- Find the largest files in your current directory and its sub directories.
- Export only recently modified
.svg
files to.png
- Check if a file does not exist
Export Inkscape SVG files to EPS for PLOS journals¶
-T
converts text to outlines so that fonts do not have to be embedded.
Print only the top 25 reads from a FASTQ file¶
Replace FASTQ read name by ascending numbers starting at 0¶
gzip -dc <INPUT.FASTQ.GZ> | \
awk 'BEGIN {line=3;read=0} ++line==4 {$0="@"read;line=0;read++} 1' | \
gzip > <OUTPUT.FASTQ.GZ>
Transferring snapgene
exported primer files to local desktop¶
Looking for specific primers in snapgene
exported primer files¶
This looks for primers starting as oAS8 followed by 6, 7, 8, or 9 in the snapgene
-exported files.
Mounting snapgene
from serine
onto your local machine¶
Logging into serine
and opening snapgene
¶
Find absolute links to images in markdown files and replace them with relative links.¶
Find the largest files in your current directory and its sub directories.¶
You might want to check and delete these periodically.
-
First navigate to the directory you want to check.
-
The following command will print out the size and location of the 30 largest files in your current directory and its subdirectories.
-
Once you have identified these files, delete the useless ones using
rm FILE_LOCATION
.
Export only recently modified .svg
files to .png
¶
This works for files in the current working directory.
for file in `find *.svg -type f -mmin -60`; do newname=${file//svg/png}; inkscape --export-png=$newname --export-dpi=300 $file; echo $newname; done