bash diff alternative
How to setup a bash diff alternative nano -w /usr/bin/diff2 Copy and paste the below in to /usr/bin/diff2 #!/bin/bash # # name: diff2.sh # usage: . file1 file2 # To make available to whole system copy to /usr/local/bin # and…
How to setup a bash diff alternative nano -w /usr/bin/diff2 Copy and paste the below in to /usr/bin/diff2 #!/bin/bash # # name: diff2.sh # usage: . file1 file2 # To make available to whole system copy to /usr/local/bin # and…
PAYWARE Ultra Edit (win + linux) – Beyond Compare (win + linux) – Araxis Merge (win + osX) – ExamDiff Pro (win) – ECMerge (win, osX, linux) – MergePlant (win) – Changes (OSX) …
Linux ifconfig Example Type the following command: ifconfig | grep ‘inet addr:’| grep -v ‘127.0.0.1’ | cut -d: -f2 | awk ‘{ print $1}’ FreeBSD/OpenBSD ifconfig Example Type the following command: ifconfig | grep -E ‘inet.[0-9]’ | grep -v ‘127.0.0.1’…
here’s how to replace text in a file with perl: perl -pi -e ‘s~OLDTEXT~NEWTEXT~g’ /path/to/filename
I needed to rename a bunch of apache virtual hosts to *:80 and *:443. Here’s an example that renames to httpd.confr and changes :80 and :443 to *:80 and *:443: # sed -ir ‘s/VirtualHost [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}:80/VirtualHost *:80/’ # sed…