Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cat vs more - differences

Status
Not open for further replies.

bhowani

Technical User
Sep 18, 2002
3
ZA
hi,

i'm familiar with the commands 'more' and 'cat', but am unsure about their differences; and would be grateful if someone could clarify them for me. I needed to pass a parameter from a lower level script to my current script. To do this, I redirected the value to a file and in the main script assigned the read value into a new variable. When I scripted var=`more file`; and used var it errors with ^J characters in the output. When I used var=`cat file`, it passed variable if conditionals successfully. Out of curiosity, I'd appreciate someones help to reason this out.

thanks
shanil bhowani
 
man cat
man more
The short answer is that more is a pager and then needs a tty to display upon.

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top