Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Closed TopicStart new topic
> Help With File-info Script, i need help plz
post Oct 12 2005, 04:44 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 12-October 05
Member No.: 5,620

i need help with making a bin/bash script that can do this, iam very new to linux so could you plz help ty

Write a script named file-info that:

- Accepts a directory as an optional command line parameter

- Clears the screen

- Displays an error message and terminates if more than one parameter is provided.

- Uses the current directory if no parameter is provided.

- Displays an error message and terminates if the provided parameter is not a directory

- For the directory to be processed, displays a single line of information about each regular file within it: file name, file size, file owner (in that order). For any file that is zero bytes in length, the script is to offer to delete the file, accepting only y/n responses and then proceeding accordingly.

- Contains appropriate documentation and error checking.

- (Hint: the following command can be used to set the values of positional parameters: set -- $(ls l filename) This may be useful in this script although the script can be written using other commands already in your repertoire.)

ty in adavance
Go to the top of the page
+Quote Post
post Oct 13 2005, 04:46 PM
Post #2

RMS is my Hero

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404

Good job on copying down your homework assignment.

How about learning how to do something yourself?

*Points finger at the author above him* They're a witch! Burn them!
Vist my website!
Join me in IRC! Server: Channel: #UnhandledExceptions
Go to the top of the page
+Quote Post
post Oct 18 2005, 08:01 AM
Post #3

RMS is my Hero

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5

This has to be the best documentation of a homework assignment I have ever seen in a forum.

I give you an A+

This thread is now closed!


Chris W.
Go to the top of the page
+Quote Post
post Oct 18 2005, 12:48 PM
Post #4

RMS is my Hero

Group: Support Specialist
Posts: 782
Joined: 6-October 02
From: Trichy,INDIA
Member No.: 29

Yeah man, it takes the cake.

I would have loved to help him out.But not for free. biggrin.gif

Hemant Kumar
user posted image
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 26th April 2018 - 06:00 PM