Skip to content

Instantly share code, notes, and snippets.

@i-saad
i-saad / split.sh
Created November 11, 2020 11:05
Script to extract records from csv/text in seperate files (enhanced)
#!/bin/bash
folder="/mnt/drive/demo"
source="all-with-cats.csv"
word=",persian,"
IFS=','
read -ra split <<< $word
destination=${split[1]}
#just clearing variable
@i-saad
i-saad / wordpress-fresh.sh
Last active July 10, 2020 10:28
Install Wordpress on fresh Ubuntu
#not #!bin/bash script, its sequence of commands, can be altered to run as script
sudo apt update
sudo apt upgrade
#First install apache2
sudo apt install apache2
# it installed apache version 2.4.29-1ubuntu4.13, may vary in future
sudo apt install php libapache2-mod-php php-mysql
@i-saad
i-saad / nagios-nrpe.sh
Last active May 23, 2020 19:13
Install Nagios NRPE plugin on hosts to be monitored
## Not a script #!/bin/sh just sequence of commands, can make it executable after reviewing
#first install plugins
sudo su -
cd /opt/
apt-get install -y build-essential
wget https://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz
tar zxf nagios-plugins-2.3.3.tar.gz
cd nagios-plugins-2.3.3
./configure
make