for extra fun try watch -t -n 1 "factor \$(date +%s)"
alias primetime watch -t -n 1 "factor \$(date +%s)"71–80 of 159 posts
for extra fun try watch -t -n 1 "factor \$(date +%s)"
alias primetime watch -t -n 1 "factor \$(date +%s)"Returns just the filename plus extensions e.g.
basename a/b/c/d/foo.php returns foo.php
Very useful for shell scripting.
One note: I believe `shred` won't work as expected on a journaling file system like ext4.
Source: https://www.gnu.org/software/coreutils/manual/html_node/shre...
My favorite: basename Returns just the filename plus extensions e.g. basename a/b/c/d/foo.php returns foo.php Very useful for shell scripting.
My favorite: basename Returns just the filename plus extensions e.g. basename a/b/c/d/foo.php returns foo.php Very useful for shell scripting.
$ basename a/b/c/d/foo.php .php
foo
The complement to basename is dirname: $ dirname a/b/c/d/foo.php
a/b/c/dJust look at anything in the "moreutils" package. Just great stuff. Excerpt: - ifdata: do not parse the output of ifconfig/ip anymore. Just use this tool. - sponge: when you need to overwrite an input file at the end of pipe. sponge will wait for the pipe to end before overwriting, preventing any data loss - vidir: edit a given dir with your EDITOR. Awesome for mass renames/deletes. - ts: add timestamps to a command…
For personal use these are great. But if you write a shell script to be executed on different machines where you can't install anything, these tools won't be available to you.
And if you don't have that requirement, i.e. you can install everything, just install appropriate Perl/Python/Ruby libraries and use a proper scripting language.
(BTW, I tend to assume that Python is installed on almost all modern Unix systems by default, hence I prefer writing portable tools in Python instead of portable Shell code.)
Which xyz-file buried in the code base has that "abc" function I saw last month? locate /\*xyzGlobPattern | xargs grep -E '\<abc[(]'
Why does one use `font-weight: 200` for code?
It's to keep the page weight balanced. Prose is considered to have neutral buoyancy, but code is naturally heavier and will tend to drag the page down if that isn't compensated by a lighter font. FWIW poetry can be so light, that it can require a very heavy font weight to keep it tethered to the page.
"cal -3" is quite useful, I use it all the time. To show the week-of-year use "ncal -w". Add "-S" if you want ncal to start weeks on Sunday (crazy!).
Don't forget the often overlooked "apropos"!