LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2009, 10:04 PM   #1
manya
Member
 
Registered: Apr 2004
Posts: 194

Rep: Reputation: 15
Numbe of files in case statement


Hi Guys,

I need a script where script should detect the files from a directory and allows me to choose from them like we do in case or select statement, upon providing number it should automatically pickup that file and it will be mailed out. The glitch here is the files will get appended everyday and will have $DATE appended to it.

Any clue how can I achieve that?


like this

Which file would like to send

1] a.txt
2] b.txt
3] c.txt
4] d.txt

Option : 1
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-26-2009, 10:24 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
http://tldp.org/LDP/Bash-Beginners-G...ect_09_06.html
 
2 members found this post helpful.
Old 11-26-2009, 10:50 PM   #3
manya
Member
 
Registered: Apr 2004
Posts: 194

Original Poster
Rep: Reputation: 15
Perfect ..thnks a chrism01
 
0 members found this post helpful.
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Case Statement craigjward Programming 6 12-12-2007 11:33 PM
Case statement with If statement cbo0485 Linux - Newbie 4 11-07-2007 08:05 PM
case statement baks Programming 2 03-15-2007 01:19 PM
problematic case statement alaios Programming 4 08-24-2005 09:05 AM
bash'ed by case statement??? 3inone Programming 2 04-29-2004 04:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration