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
> Scripting Help, Count directories using then echo results
post Mar 10 2015, 05:59 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 10-March 15
Member No.: 18,848

I need help on a project that I am trying to do for class. I just can't seem get it, everything that I'm doing errors out. I know that I need to use a loop of some kind and that I need to ls | wc -l, but no matter what I try I can't get it to work ... sad.gif please help if you can.


1. Script should accept a folder name as an argument.
2. The script should determine the number of files in the folder given as an argument in #1
3. Further, the script should only list the first half of the files( so if there are 6 files, only have it list the first 3)
4. When listing the file names, they should be in the following structure.

"1- this file "x1" is in the top half of the folder list"
"2- this file "x2" is in the top half of the folder list"

note- "x1" and "x2" represent the file names

5. Also, the program should show the number of files in folder before listing the files.

Go to the top of the page
+Quote Post
Start new topic
post Mar 10 2015, 06:53 PM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,806
Joined: 23-January 03
Member No.: 360


We will help but do not expect others to do your assignments. So post what you have written so far.
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this 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: 23rd March 2018 - 03:47 AM