Not able to read variable in unix


hi,

trying display variable's value in terminal of mac. not happening.

steps do-

set var = 2
echo $var

should display 2, empty line shown.
think need set env variable.but not know details. please help.
 

which shell this?

if "bash"

try this
var=2
echo $var.

if running "csh" be
setenv var 2
echo $var

title says "in unix" yes mac os based on unix unix name of os.. typing commands program called shell. there several shells can use. mac os x ships @ least 3 shells , pick runs each account
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Mac OS X Server as File Server for 50/50 Mac & PC Workgroup

Permissions Problem?

iPhone won't sync with iTunes