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 > UNIX for Dummies Questions & Answers > Homework & Coursework Questions
.
google unix.com



Homework & Coursework Questions Students must use and complete the template provided. If you don't, your post may be deleted! Special homework rules apply here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to make interactive shell script a automated one? bhaskar_m Shell Programming and Scripting 2 02-03-2009 01:51 AM
interactive shell script to create users 10.4 tlarkin OS X (Apple) 3 03-27-2008 03:35 PM
Schedule an interactive shell script Chaitrali Shell Programming and Scripting 4 11-08-2007 11:49 AM
Korn shell interactive script leonard905 Shell Programming and Scripting 3 08-02-2007 03:16 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 08-16-2009
rits's Avatar
rits rits is offline
Registered User
  
 

Join Date: Aug 2009
Location: India
Posts: 7
Question Help with Interactive / Non Interactive Shell script

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files only.
- - - - - - - - - - - -- - - - - - - - - - - - - - -

The main problem Im facing with this question is how to make the program pick up a C program in case no arguments are specified .

Code :
Code:
ls -lrt *.C
Please elaborate it .
 

Bookmarks

Tags
arguments, c program, directory, file, pick

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 12:24 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