#!/bin/sh b=5 a=`ls -1 /dir/ | sed -n '$(b)p'` echo $a exit