SCP and Pass Variable in Bash Script

#!/bin/bash read -p 'Enter the Files to be Send to Remote Host: ' files destination_directory='/home/oracle' scp -i /Users/shadab/wha.pem $files oracle@192.168.1.200:$destination_directory ## SAMPLE USAGE ## # shadabs-MacBook-Pro:~ shadab$ ./scp_files.sh #Enter the Files to be Send to Remote Host: *.sh #scp_files.sh 100% 344 39.1KB/s 00:00 #scp_files_gone.sh 100% 344 52.3KB/s 00:00 # # #shadabs-MacBook-Pro:~ shadab$ ./scp_files.sh #Enter the … Continue reading SCP and Pass Variable in Bash Script

Documentation#1193 – Unknown system variable ‘lc_messages’

This error you would usually see when you login to phpMyAdmin after an upgrade. This is related to your MySQL version, in my case I had upgraded my phpMyAdmin but the MySQL version was still on 5.1, after upgrading to MySQL 5.6 it solved the issue You can upgrade MySQL to the latest version by … Continue reading Documentation#1193 – Unknown system variable ‘lc_messages’

Generate REST API from mysql database in less than 5 minutes

Representation State Transfer is the new industry standard of building technology neutral API's. REST API are essentially web services to read or transfer data. REST API's can be build on top of most relational databases. Mysql being the most popular database around. If you have nodejs and mysql already installed, you can build a REST … Continue reading Generate REST API from mysql database in less than 5 minutes

Install mysql database along with phpadmin on CENTOS 6 7

Mysql is the most popular open database and is the M in the LAMP stack (others being Linux-Apache-PHP) If your on CentOS and your linux server is connected to the internet installing mysql is just a few terminal commands 1. Install the LAMP stack via yum $ yum install httpd mysql-server php php-mysql 2. Configure … Continue reading Install mysql database along with phpadmin on CENTOS 6 7

Install Oracle Apex 5.1.x, 18.1 on ORDS 3,17.4, 18.1

Oracle Apex is a modern framework to quickly develop and deploy web apps sitting on top of Oracle Database. Apex can be run directly from the database engine itself using a component called Mod PL/SQL. It is one of the easiest way to run Apex, but it is not a production ready setup. In a … Continue reading Install Oracle Apex 5.1.x, 18.1 on ORDS 3,17.4, 18.1

Install NodeJS on CentOS 6 – 7

Install Latest NodeJS on CentOS 6 or 7 -------------------------------------- 1. Add Repo and Install NodeJS For Stable Release:- $ yum install -y gcc-c++ make $ curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash - $ yum install nodejs   2. Check the version for Node and NPM $ node -v v8.11.1 $ npm -v 5.6.0   … Continue reading Install NodeJS on CentOS 6 – 7

Execute Windows Commands from Linux using winexe. Connect from Linux to Windows without SSH

Winexe – is a software on Linux which uses RPC to run remote commands and might even come with your distribution's packages. It depends on Samba for running rpc commands Edit: even if your distro does not have it precompiled and you do not want to compile yourself, you should check out the Build Service … Continue reading Execute Windows Commands from Linux using winexe. Connect from Linux to Windows without SSH

Compare 2 Servers RPM and Install RPM from Text File List

1. Generate RPM list on Old Server rpm -qa --queryformat='%{NAME}\n' | sort > serverold.txt 2. Generate RPM list on New Server rpm -qa --queryformat='%{NAME}\n' | sort > servernew.txt 3. Copy File to New Server and use diff comand to get differences diff serverold.txt servernew.txt > diff.txt 4. Get list of packages missing in new Server … Continue reading Compare 2 Servers RPM and Install RPM from Text File List

ORA-29548 release of java system classes in the database (12.2.0.2.160419.1.6 ) does not match that of oracle executable (12.1.0.2.170418 1.6)

This error is mostly due to a mismatch in the Java system classes. It happened to us when we cloned a 12c Database which was on a lower home version to a 12c home on a higher version. It requires data patch to be run and rollback the old patch and apply the new JVM … Continue reading ORA-29548 release of java system classes in the database (12.2.0.2.160419.1.6 ) does not match that of oracle executable (12.1.0.2.170418 1.6)

Shell Script to Add Date to Filenames

Below Shell Script will append Date to all FileNames in Directory with extension .TXT. Also it will create a folder with the Date and move the files to it. #!/bin/bash FILE="$(date +%Y%m%d)" cd /bi_dataload mkdir -p /bi_dataload/BI_$FILE for f in *.TXT do mv -n "$f" /bi_dataload/BI_$FILE/"${f%%.*}"_"$FILE".TXT done