The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How can i read a non text file in unix - ELF-64 executable object file - IA64 alexcol UNIX for Advanced & Expert Users 8 11-07-2008 08:56 AM
File read/delete synchronization in unix saumya.c UNIX for Dummies Questions & Answers 2 02-08-2008 02:15 PM
read or search the item in a file sequentially by position using unix shell script? lok UNIX for Dummies Questions & Answers 6 07-12-2006 07:53 AM
How do u open a read only file in Unix? JosephGerard UNIX for Dummies Questions & Answers 1 07-21-2005 07:48 PM
file read + unix script vivekshankar UNIX for Dummies Questions & Answers 2 05-23-2005 04:18 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-18-2008
Sibasish Sibasish is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 5
How to read from a .dat file in Unix

Hi All,

I have a .dat file named test.dat where I have stored some process IDs.
Now I need to pick a process ID, one by one and then fire kill -9 for each of those. The logic should be:

1. open file <filename.dat>
2. read until last line of file
3. if process ID is found fire kill -9 <process ID>


Can anyone help me out with the Unix script for this?

Please help urgently.

Thanks in advance,
Sibasish.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0