The UNIX and Linux Forums  


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
please give a bourne script to this problem raj1811 Shell Programming and Scripting 1 09-30-2006 05:36 PM
How do I test for the presence of a file in Bourne Shell vins UNIX for Dummies Questions & Answers 3 03-17-2006 03:42 PM
If file exists (bourne shell) blakmk UNIX for Dummies Questions & Answers 2 11-19-2003 10:47 AM
simple Bourne problem pnxi Shell Programming and Scripting 5 09-09-2003 09:33 AM
bourne mail script problem Priest_Ridden Shell Programming and Scripting 6 12-12-2001 01:52 AM

 
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 05-08-2008
kdyzsa kdyzsa is offline
Registered User
  
 

Join Date: May 2008
Posts: 14
Sh, Bourne Problem with getting lines in a file

This is a new exercise for me
1.) Create a bourne shell script that can accept 2 arguments/parameters. Name your script as housekeep_files.sh.

2.) The script will delete the files specified in the input file (1st parameter) and will send a notification through email (2nd parameter) the list of files deleted.

Sample input file: /home/mis/training/tanzs/files_to_delete.txt
ex. files_to_delete.txt
man.txt
see.txt
go.txt
no.txt

Being relatively new to this type of programming, I don't know how to approach this. How can I get the man.txt and seperate it from see.txt?
Is there any way to loop this and put it in an array while it is not end of file? Also does bourne support array? so i can put these text into an array? file[i]=??
 

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 04:03 PM.


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