Monday, March 23, 2020

HOWTO: PostgresDB & pgAdmin4 setup on RHEL 8



---
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

dnf install postgresql12-server postgresql12-contrib
---

yum install pgadmin4

/usr/pgadmin4/bin/./pgadmin4-web-setup.sh

service httpd start

Monday, March 16, 2020

Handy UNIX diff: Exclusive match

Super handy tool for selectively removing serial contents from a text file:

#!/bin/bash
# xdiff <new_file> <old_file>
# Exclusive diff - just show what's different from the first file
#       example: xdiff SYMBOLS.txt remove_symbols.txt >SYMBOLS2.out
diff -u $1 $2 | grep '^-[^-]' | sed 's/^-//'