Sunday 6 March 2016

Run shell script at start of System

Using cron this can be accomplished .

crontab -e
then select editor (vim,gedit,nano)

Add following command in crontab editor :

@reboot  /path/toscript/

Then save the crontab . Now each time your system bootups this script will be invoked.

Thursday 3 March 2016

Create Table in HBase using Linux Script



#!/bin/bash

TABLE="sample"

exec hbase shell <<EOF
     create "${TABLE}",'f1'
EOF

save this script as .sh file and run. It will create a table in HBase.