Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 "$@"
  less "$index"

Apparently this is wrong. Any suggestions?

share|improve this question

Why not this..

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


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.