delete strings after match to eol using sed command
# You can use awk's field separator (-F) following way:
$ cat file
google.com/funny
unix.stackexchange.com/questions
isuckatunix.com/ireallydo
$ cat file | awk -F '\\.com' '{print $1".com"}'
google.com
unix.stackexchange.com
isuckatunix.com
# To explicitly delete everything that comes after ".com", just tweak your existing sed solution to replace ".com(anything)" with ".com":
sed 's/\.com.*/.com/' file.txt
Also in C++:
- install flask auto reload
- how to download and use ubuntu on windows 10
- nonexistentpath data directory /data/db not found
- shell script to convert yaml
- how to get environment variables in powershell
- github remove a file from a commit
- how to install git lfs on mac
- linux nano editor
- terraform state
- debian install nvidia driver
- git reset branch
- mongoose connection node
- fancy edittext android github
- how to convert ui to py pyside2
- nuxt install pug
- how to fix corrupted git file
- RuntimeError: The current Numpy installation fails to pass a sanity check due to a bug in the windows runtime.
- powershell clone all repos
- install ruby environment on ubuntu 20.04
- https://git-lfs.github.com/
- install angular bootstrap
- brew uninstall mysql
- brew
- rmdir command