Posts Tagged shell scripting
How to Save file in vi not opened with sudo
Posted by Srijith R in linux, shell scripting, vi on December 26, 2009
It has happened to me a lot of times that i edit a file in vi. I insert and edit a lot and finally when I try to save it I find that I dont have permission for it. If only I had opened it with sudo. I found a solution for this issue. It was actually a simple command and here it is
Continue reading “How to Save file in vi not opened with sudo” »
Script for Auto Copying of Cds/Dvds
Posted by Srijith R in linux, shell scripting on December 26, 2009
Here is a script that i created for automatically copying all the files in cd to a folder and ejecting and waiting for the next cd.
So here is how it works.
You need to change the folder names and paths accordingly. And the shell script as
Continue reading “Script for Auto Copying of Cds/Dvds” »
Copy in Linux with Ui
Posted by Srijith R in linux, shell scripting on December 13, 2009
The program here is an UI for cp command. I have used cp in the background but over that I am just monitoring the files copied and speed of copying.
It’s not a perfected program. It’s quick one but works fine.
Execution:
Create a file named copy and insert the following code and give execute permission
Continue reading “Copy in Linux with Ui” »
Birthday Reminder For Gnome Panel
Posted by Srijith R in birthday, linux, panel, shell scripting on March 17, 2009
This program checks the file /home/rsrijith/shell/birthday_reminder.txt to find the upcoming birthdays in 20 days and writes into the file /home/rsrijith/shell/birthdays.
There is a file called /home/rsrijith/shell/birthdays1, the difference between it and birthdays file is that birthdays contains only first name of the person and birthdays1 contains the whole name.
So that’s it. Now the code….
Continue reading “Birthday Reminder For Gnome Panel” »
Reminder for Gnome Panel
Posted by Srijith R in linux, panel, shell scripting on March 17, 2009
This is the program that lets us to enter the text and time at which it should be reminded me. The command has the following options
Continue reading “Reminder for Gnome Panel” »
Auto Away Notifier for Pidgin in Perl
Whenever I am away from laptop my chat buddies leave me lots message and finally lots of “You there???”. So I thought of making a script that would inform my buddies that I am away when someone sends me a message.
This method works with Pigin API.
I have used /proc/acpi/button/lid/C267/state file to find if the lib of the laptop is closed or not. This file may vary in your laptop. So try to find the find the file in your computer that stores the status of the lid. It should be a file in /proc/acpi/button/lid/ folder and replace the file accordingly in your computer.
The Content of /proc/acpi/button/lid/C267/state is state: open and state: closed when the lid was closed.
Continue reading “Auto Away Notifier for Pidgin in Perl” »
BSNL Dataone Auto Downloader
Posted by Srijith R in acpi, dataone, linux, shell scripting on February 1, 2009
Bsnl(India) provides an account that has 2am to 8am unlimited download. It was not easy to wake up at 2am and switch on the computer and sleep again. So I tried to find a method to switch on the computer automatically at 2am and download and shutdown at 8am. Although the I thought the idea was foolish, I found out that there actually is a method for doing it. “ACPI Alarm” was introduced in 1999 or so (Even my old PC had it).
Continue reading “BSNL Dataone Auto Downloader” »
Automatic Desktop Wallpaper Changer for Linux
Posted by Srijith R in gnome, linux, shell scripting on November 16, 2008
I have a lot of wallpaper that I wanted to switch automatically. After a lot of search i found that there a command way to control all the gnome settings. So I the command I used is “gconftool-2“.
So code is like:
Continue reading “Automatic Desktop Wallpaper Changer for Linux” »
Recent Comments