In a #sed substitution pattern, you can use any character as a separator instead of /
Useful for path or urls:
s!/usr/local!/opt!
Notices by Yes, I Know IT ! π (yesiknowit@mastodon.social), page 10
-
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Wednesday, 28-Nov-2018 11:46:48 EST Yes, I Know IT ! π
-
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Wednesday, 28-Nov-2018 05:26:10 EST Yes, I Know IT ! π
From a POSIX shell `$OLDPWD` holds the name of the previous working directory:
cd /tmp
echo You are here: $PWD
echo You were here: $OLDPWD
cd $OLDPWD -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Tuesday, 27-Nov-2018 23:06:29 EST Yes, I Know IT ! π
When using the find command, use `-iname` instead of `-name` for case-insensitive search
#Unix #Linux #Shell #Find -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Tuesday, 27-Nov-2018 16:37:15 EST Yes, I Know IT ! π
If you ever had to connect to an Oracle backend, you may know how painful it used to be to set up an Oracle Instance on your test/dev host.
Thanks to @Docker, it is now several orders of magnitude simpler!
-
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Tuesday, 27-Nov-2018 11:00:39 EST Yes, I Know IT ! π
If you don't know what is #Awk or how it could help you processing text files, then you NEED that little introduction:
https://youtu.be/PUYS6MO4p7Y -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Tuesday, 27-Nov-2018 10:17:04 EST Yes, I Know IT ! π
@clacke Sometimes you write a long commit message, then realize you forgot something but don't want to clear the entire text to abort the commit
In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Tuesday, 27-Nov-2018 05:27:42 EST Yes, I Know IT ! π
Centering text on 80 columns with stars:
sed -E ':x
s/^.{,80}$/*&/
s/^.{,80}$/&*/
tx
' fileIn conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Monday, 26-Nov-2018 23:59:54 EST Yes, I Know IT ! π
Delete all but the last line of a file:
sed -n '$p' fileIn conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Thursday, 01-Nov-2018 18:01:23 EDT Yes, I Know IT ! π
Display all user accounts separated by a colon in one very long line
cut -d: -f1 /etc/passwd | paste -s -d:
In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Thursday, 01-Nov-2018 12:35:38 EDT Yes, I Know IT ! π
In the Bash, `~-` is expanded to the content of `OLDPWD`. So:
cd ~-/..
is a shortcut for the 2 commands:
cd "$OLDPWD" (or `cd -`)
cd ..In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Thursday, 01-Nov-2018 05:58:16 EDT Yes, I Know IT ! π
Merging files on a line-by-line basis with the `paste` utility
https://yesik.it/EP23In conversation from mastodon.social permalink Attachments
-
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Thursday, 01-Nov-2018 00:00:51 EDT Yes, I Know IT ! π
Find words starting with `lin` (according to `/usr/share/dict/words`):
```
look lin
```In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Wednesday, 31-Oct-2018 05:17:18 EDT Yes, I Know IT ! π
Poor's (wo)man stopwatch in your shell:
```
time read
```In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Saturday, 27-Oct-2018 17:00:42 EDT Yes, I Know IT ! π
Display a 2x3 matrix:
seq 6 | paste - - -
In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Saturday, 27-Oct-2018 10:42:06 EDT Yes, I Know IT ! π
vlc -Idummy -Vcaca "Star Wars: Episode IV - A New Hope (1977).mkv"
Play #StarWars as it was originally intended by @GeorgeLucasILM back in the 70s
In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Friday, 26-Oct-2018 10:42:43 EDT Yes, I Know IT ! π
Split a fixed-width or delimited text file into individual columns using the `cut` command
https://yesik.it/EP22In conversation from mastodon.social permalink Attachments
-
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Thursday, 25-Oct-2018 03:48:10 EDT Yes, I Know IT ! π
`split` and `csplit`. Old friends, I used them a lot in the 1.44MB floppy disk era...
https://www.linux.com/learn/intro-to-linux/2017/8/splitting-and-re-assembling-files-linux
by Carla Schroder (https://twitter.com/CarlaSchroder)In conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Sunday, 21-Oct-2018 05:37:12 EDT Yes, I Know IT ! π
A byte is, and always was, an 8 bits quantity!
No.
https://www.yesik.it/blog/2018-bit-nibble-byte-and-word
#Bit #Byte #Octet #Nibble #Word
#BinaryArithmetic #BooleanAlgebra
#ComputerScience #ComputerHistoryIn conversation from mastodon.social permalink -
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Saturday, 20-Oct-2018 13:10:19 EDT Yes, I Know IT ! π
Do you want to run a Windows software on Linux? Or optimize your costs by running several virtual servers on the same hardware? In those cases, like in many other ones, virtualization is the technology to leverage.
But with so many different virtualization technologies readily available today, which one is the best for YOUR needs?
https://yesik.it/VIRT101
#VM #Containers #Emulation #Wine #CheatSheetIn conversation from mastodon.social permalink Attachments
-
Yes, I Know IT ! π (yesiknowit@mastodon.social)'s status on Saturday, 20-Oct-2018 06:59:02 EDT Yes, I Know IT ! π
http://www.ostechnix.com/4-easy-ways-to-generate-a-strong-password-in-linux/
My preferred :
openssl rand 14 -base64
gpg --gen-random --armor 1 14... but the passwords are not easy to remember. A good argument to use a password manager.
#password #linux #gpg #opensslIn conversation from mastodon.social permalink