Delete all lines in the file myfile
that contain the string foobar
:
sed -i '/foobar/d' myfile
Delete all lines in the file myfile
that contain the string foobar
:
sed -i '/foobar/d' myfile
# author: Anton Kratz | |
# created: Mon Dec 17 19:08:48 PST 2018 | |
# Based on original code by Mike Yu which is at [1]. However [1] has various NDEX and other | |
# code intermingled which is not necessary in this context. Also, I am building a similarity | |
# table for DNA repair on the fly. | |
# [1] https://github.com/michaelkyu/ddot/blob/master/examples/Process_the_Gene_Ontology.ipynb | |
import requests |
You might run into a situation where git log
, man man
display absolutely nothing. This could be b/c bash forgot the PAGER variable. How this is possible is beyond me. You must reset the PAGER variable and then it will work again:
export PAGER=less
The find
command is very slow. locate
is much faster, but relies on a database, which is typically build nightly. Often I have mounted remote filesystems using sshfs
. By default, the database is not build for sshfs-mounted filesystems.
Build an mlocate database for the sshfs-mounted dir /home/kratz/mpoints/cellar
(see below for cron version):
updatedb -l 0 -o ~/.cellar.db -U /home/kratz/mpoints/cellar
find ./ | sed -e 's/[^-][^\/]*\//--/g;s/--/ |-/' |
The main guide on how to install R for any flavour of linux, binary or from source, is at http://cran.stat.ucla.edu/
Three different pathways to a working install, from simple to hard:
I am assuming you are on Ubuntu 16.04 LTS.
find . -type f -exec \
bash -c 'md5sum "$0" | grep -q b2a490745fe5fe8a41c0d1040faff507 && echo $0' {} \;
https://superuser.com/questions/653185/finding-a-file-by-md5sum