shell program to list all files in directory

Asked by richa

Need a shell program to find smallest and largest string(in respect to string length) among list of 5 strings given by user.

Question information

Language:
English Edit question
Status:
Answered
For:
Fedora Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Martijn Cielen (mcielen) said :
#1

can you further explain what exactly would be different from using ls?

Revision history for this message
Jonathan Marsden (jmarsden) said :
#2

This sounds a lot like a homework assignment -- is the whole idea to write a shell script that does not use any other programs, only builtin shell commands? In that case, perhaps

#!/bin/sh
for i in $@ ; do echo $i/* ; done

is a possible answer to this sort of 'problem'?

Jonathan

Revision history for this message
sowmya rao (sowmya-raohebbar) said :
#3

no idea on applying commands in shell program.

Revision history for this message
sowmya rao (sowmya-raohebbar) said :
#4

no idea on shell programs related to string... Please help

Can you help with this problem?

Provide an answer of your own, or ask richa for more information if necessary.

To post a message you must log in.