Tagged: linux

0

iTerm2 shell integration scripts offline usage

At times we are working in an internet less environment. So, here are a few things we can do, Make the scripts available over a local http server Change scripts for any http://internet-address/ to http://local-address Making scripts available on local $...

0

Run a script as root

Source: http://www.cyberciti.biz/tips/shell-root-user-check-script.html Sometime it is necessary to find out if a shell script is being run as root user or not. When user account created a user ID is assigned to each user. BASH shell stores the user ID in $UID...

0

Super charge bash with these bash_profile tips

Some tips and tricks to super charge bash Tip #01: Up down arrow auto complete ~/.inputrc #File: ~/.inputrc ## arrow up “\e[A”:history-search-backward ## arrow down “\e[B”:history-search-forward   Tip #2: Auto complete hostnames in ssh, scp. More details here. $ brew install...

0

ldapsearch – ldap command to test connection

Well the post name is a misnomer. Lately I’ve been using ldapsearch command to test connection to ldap server, hence the name. Following is the shell command, $ ldapsearch -x -LLL -h ldapserver.example.com -D username -w password -b “DC=example,DC=com” -s...

0

Setup bulk password-less ssh

Following script will help in setting up password-less ssh in one shot to multiple machines, Usage sample: $ remote-keyless.sh <file_of_hosts.txt> [password] #!/usr/bin/expect -f # remote-keyless.sh, v0.1, 2016-05-03, [email protected] # v0.2, 2016-09-28, [email protected] – added to make it compatible with pdsh ;)...

0

Processing shell program arguments

Method 1: Without using getopts while [[ $# > 1 ]] do key=”$1″ case $key in -u|–user) _USER=”$2″ shift # past argument ;; -s|–server) _SERVER=”$2″ shift # past argument ;; *) # unknown option printf “Usage: %s: [-s <server> -u...

0

A nice .vimrc

Using the settings below will add colors to vi editor, change the tabstops to 4 and adds more niceness. This is how my .vimrc looks like. filetype plugin indent on ” show existing tab with 4 spaces width set number...

0

Installing perl modules in non standard directory

Source: http://modperlbook.org/html/3-9-1-Installing-Perl-Modules-into-a-Nonstandard-Directory.html Specifying PREFIX=/home/user is the only part of the installation process that is different from usual. Note that if you don’t like how Makefile.PL chooses the rest of the directories, or if you are using an older version of it...

0

Compiling in $HOME

Original article Author updates   Original article Source: http://blog.sanctum.geek.nz/compiling-in-home/ If you don’t have root access on a particular Linux system that you use, or if you don’t want to install anything to the system directories and potentially interfere with others’ work...