Archive for the 'Shell scripting' Category
- Quick Shell Tip: Remove grep command while grepping something using ps command
Generally you use ps command to find out all running process. You may also pipe out ps command output via grep command to pickup desired output.
Basically you don’t want display grep command as the process.
Let us run combination of ps and grep command to find out all perl processes:
$ ps aux | [...] - How to: Run All Shell / Perl / Python Scripts in a Directory
I’ve directory called /home/vivek/scripts/daily with over 25 perl / shell / python scripts for managing daily tasks. One day for some weird reason my crond died and I did not noticed the incident for 2 days.
Now crond is started and I’d like to run all those scripts. Here is a quick for loop running all [...] - Quick tip: Easily find strings with grep color highlighting feature
grep command is the de facto tool for searching text files. However when there are too many matches, it can be difficult to find the requested text in the search results. grep comes with –color=’auto’ option. It surrounds the matching string with the colour, thus resulting enhanced output.
Finding string with color highlighting
Pass [...] - SSH: Rotate backup shell script to remove directories (old backup files)
Most time you have a limited space on the remote SFTP/ SSH backup server. Here is the script that periodically cleanup old backup files from the server i.e it will remove old directories.
Requirements
Script will automatically calculate date from today’s date. By default it will keep only last 7 days backup on server. You can easily [...] - Access Google Calendar From Linux / UNIX / Mac OS X Command Line Interface
I use Google Calendar exclusively. However to access this product you need to use a web browser. There is nice program called gcalcli (Google Calendar Command Line Interface) which allows to access Google Calendar from bash shell. Now I can see an agenda using a specified start/end time and date from a shell prompt [...]
- Book Review Shell Script Pearls
Shell Script Pearls is designed to provide information about shell scripting. The book is collection with all tips and code sample you need to learn about shell scripting. Author has clearly demonstrated unique tools and script samples that go beyond the level of basic scripting. The book is useful for geeks, hackers, sys admin and [...]
- Shell scripting tip: Find the length of a string under UNIX / Linux oses
Explains how to find the length of string under Linux / UNIX operating system using simple shell commands.
- How to: Linux reset the permissions of the installed rpm packages with –setperms option
Sometime by mistakes all file permissions get changed and you need to restore file permission. For example a shell script or some sort of corruption could change the permissions for packages (installed files), it may be necessary to reset them.
For example a long time ago my shell script run chmod and chown commands [...] - Domain Expiration Check Shell Script
I’ve already written about a shell script to check / monitor domain renew / expiration date here. Now I’ve modified matt’s domain-check script to support additional C/TLDs .in, .biz, .org and .info domains. I’ve also added 5 seconds delay to avoid whois server rejecting query. This script checks to see if a domain has [...]
- Howto Use SSH To Run Command On A Remote Machine
This article examined a simple, but powerful, method to run commands on a remote machine using combination of ssh and a shell script:
Use Secure Shell (SSH) to run commands on remote UNIX systems and, with some simple scripts, put together a system that enables you to manage many systems simultaneously from one machine without having [...]
Viewing 31-40 of 128 posts.
« Previous Page — Next Page »


Recent Comments
Today ~ 17 Comments
Today ~ 7 Comments
Today ~ 11 Comments
Today ~ 12 Comments
Yesterday ~ 2 Comments