Linux shell (一)

echo -e "Hello World! \a \n"     # -e 解析反斜杠


 

read -p "Please input your first name: " firstname # 提示使用者输入


[chen@hang-centos tmp]$ aa2=(4 7 44 8 9)  #定义数组


shell if语句,格式:

  if command
  then
  commands
  fi

eg:

  if ["$a"=="$b"] || ["$c"=="$d"]

  then

  echo "OK!"

  exit 0

  fi


 

ps -ef 查看正在活动的进程

ps -ef |grep abc 查看含有"abc"的活动进程

ps -ef |grep -v abc 查看不含abc的活动进程


 

dd

 

posted @ 2016-08-17 16:20  航飞冲天  阅读(148)  评论(0编辑  收藏  举报