Tags » Shell Script

Shell script to automate the backup of PostgreSQL database

chmod 777 -R /opt/backup/
su postgres <<-EOSU
	psql
	DROP DATABASE IF EXISTS "BACKUP";
	CREATE DATABASE "BACKUP";
EOSU
su postgres <<-EOSU
	psql -vFc BACKUP < /opt/backup.sql
EOSU
PostgreSQL

My First Bash Script

My first bash script in order to convenience using Git “Add” , “Commit” , “Push”

bash can’t using cd directly , using Alias or Function… 36 more words

Shell Script

[Shell Script] 인라인 파이썬코드로 ini 파일 파싱

Shell Script에서 python 을 이용하여 ini 파일 파싱

의도

쉘 스크립트를 이용해 /etc/systemd/system/서비스명 파일을 분석하려고 하니 스크립트에서 ini 형태의 파일을 분석하는게 조금 노가다성이라 python… 100 more words

Python

Shell Scripts to Ease Spark Application Development

When creating Apache Spark applications the basic structure is pretty much the same: for sbt you need the same build.sbt, the same imports, and the skeleton application looks the same. 1,529 more words

Hadoop

File operation and Comparison in shell

File operation:

#!/bin/sh
# To check the file operation using shell
# date: 05-04-2016

mkdir kishan
cd kishan > out
if [ -r $file ] 187 more words

Create a shell script to build package

Script 1: Script to create a build package

#!/bin/bash

################################################################
#File name : create.sh
#File description : This script is to create a build package… 382 more words

A Quickie on Spark Actions, Laziness, and Caching

Time is important when thinking about what happens when executing operations on Spark’s RDDs. The documentation on actions is quite clear but it doesn’t hurt to look at a very simple example that may be somewhat counter-intuitive unless you are already familiar with transformations, actions, and laziness. 329 more words

Hadoop