title: Shell Script to take a filename as argument and execute "ls filename" for directory files and "more filename" for regular file
body: <p>I am not sure if i am on the right path or not, what i have so far is </p>
  
  <pre><code>#!/bin/sh
  
  for filename in $*
  do
  if [ -d $filename ]
  then
  echo "some_text"
  ls $filename
  else
  more $filename
  fi
  done
  </code></pre>
  
  <p>But it takes me to the next prompt, no output OR warnings</p>