An Oracle blog – Amardeep Sidhu

February 27, 2008

Learning Regular Expressions

Filed under: Oracle Basics,Scripting,SQL — Sidhu @ 9:29 pm
Tags: ,

From Eddie’s blog I got a link to 3 posts on Regular Expressions on OTN written by CD. Wonderful stuff. Check out.

Part 1

Part 2

Part 3

& Thanks CD…wonderful work buddy !

September 17, 2007

Learning AWK…

Filed under: Scripting,Unix/Linux — Sidhu @ 11:24 pm

I was searching for some good tutorials on awk. Found a very nice (brilliant indeed) article on Oracle website by Emmett Dulaney. A very good introduction for beginners. I searched for some other links as well. Have a read:

1. AWK: The Linux Administrators’ Wisdom Kit

2. A Guided Tour Of Awk

3. AWK Programming

4. UNIX Utilities – awk

Happy awk’ing 🙂

Sidhu

July 16, 2007

Batch file for ftp’ing files…

Filed under: Scripting — Sidhu @ 9:54 pm
Tags: ,

Today I came across a requirement where users needed to ftp files time and again. So ftp’ing again and again is not a very good option. I wrote a small batch file for the same. Just sharing the same over here. I created a folder ftp in C drive and a file get_file.bat
Contents of get_file.bat are:

set /p file_name=Enter the name of the file you want to ftp:
echo oracle>c:\ftp\param.cfg
echo oracle123>>c:\ftp\param.cfg
echo cd /home/oracle>>c:\ftp\param.cfg
echo lcd c:\ftp>>c:\ftp\param.cfg
bin
get %file_name%
ftp -s:param.cfg 127.0.0.1

It will create a file param.cfg having all the things like username, password and command to get the file in the same folder (c:\ftp). Then we invoke ftp with -s option with specifying the file param.cfg. It will ask the user to enter the file name and ftp the file from server to c:\ftp

Sidhu

Theme: Rubric. Get a free blog at WordPress.com

%d bloggers like this: