![]() |
|
|
|
|
|||||||
| UNIX and Linux Applications Questions involving software not covered by other forum go here. This includes Databases and Middleware. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Use ftp command in shell script | infyanurag | Shell Programming and Scripting | 3 | 02-05-2008 04:06 AM |
| cd command is not working in my shell script | amitrajvarma | Shell Programming and Scripting | 3 | 10-03-2007 02:04 AM |
| how to use cd command in shell script | LAKSHMI NARAYAN | Shell Programming and Scripting | 3 | 09-09-2007 03:04 AM |
| vi command in shell script | bryan | UNIX for Dummies Questions & Answers | 2 | 05-23-2006 04:51 PM |
| Shell script command | dipanrc | Shell Programming and Scripting | 7 | 11-29-2005 07:15 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
shell script command
Hi
I have a text file named information.txt which contains information about Oracle Instances, I want to fetch data's from that text file and want to display an output using shell script. i.e. when I execute that shell script ,it should read all data's from information.txt and display an output like below. I willl try explain with an example... Say i have a file "file" containing.. Instance : DB1,windows Instance : DB2,unix Instance : DB3,solaris Instance : DB4,unix ;;;;;;;;etc so... my shell script should read the file and display output as DB1,windows,OK DB2,unix,OK DB3,solaris,OK DB4,unix, OK ;;;;; etc How do I write this script? Can you tell me ..which command wud be appropriate? |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
check out the last line in the input file Code:
awk 'length($3) { print $3, "OK" }' filename
|
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|