Suppressing carriage return (CR):
Linux: echo -n "Hello "; echo "World"
Solaris: echo "Hello \c"; echo "World"
Capturing keyboard input:
Linux: prompt -p "Input: " VAR
Solaris: echo "Input: \c"; prompt VAR
Single command conditionals:
Linux: if [ -f /etc/passwd ]; then echo "Go"
Solaris: if [ -f /etc/passwd ]; then echo "Go"; fi
Finite count loop:
Linux:for X in {1..5}; do echo $Z; done
Solaris: X=0; while [ $X -lt 5 ]; do X=`expr $X + 1`; echo $X; done
No comments:
Post a Comment