Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Question: Create a script such that it is a command that has the same effect as the "less" command (implement the script by calling "less").

What I wrote:

#! /bin/bash
for index in "$@"
do
  less "$index"
done

Apparently this is wrong. Any suggestions?

share|improve this question

1 Answer 1

Why not this..

#!/bin/bash
less "$@"

Although i guess what your teacher meant was to make a script which works like less without using less.

share|improve this answer
    
I know why you are guessing that but your answer was correct...this question is so retarded... –  Anson Jan 16 '12 at 5:53
    
unless you are asked to add some other functionality, the question your teacher has given doesnt make much sense. –  daya Jan 16 '12 at 5:55
    
Well I am guessing he asked such an easy question in our assignment was meant to let us be familiar with the usage of $@....thanks –  Anson Jan 16 '12 at 6:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.