bug_x

导航

 

1、ls |tail  >out1.txt

    eg:

       

ps -ef | grep redis-server | grep -v grep | awk '{print $2}'

  

2、子shell法

       output=$( ls |cat -n )

3、反引用:

      output1=`ls|cat -n`

      echo $output1

      

3.1
# cd `echo $JAVA_HOME`
3.2:a=echo $JAVA_HOME
cd $a

 

 

  

4、xargs

      

ps -ef | grep redis-server | grep -v grep | awk '{print $2}'  | xargs ./test

  

posted on 2021-11-03 16:54  bug_x  阅读(880)  评论(0编辑  收藏  举报