QS之shell script

1  Invoke Mdoelsim  

  In order to open Modelsim automatically, it is better to use a shell script to invoke modelsim.

 1 #!/bin/bash
 2 # ----------------------------------------------------------------------------
 3 # invoke ModelSim
 4 # ----------------------------------------------------------------------------
 5 
 6 if [ $# -eq 0 ]; then
 7     cd '01_Project/02_Project_Name/02_DIGITAL/02_modelsim'   # the working path of Modelsim
 8     vsim -gui&
 9 elif [ $1 == "-h" ]; then
10     # questasim doc
11     evince /Software/AMS/current/questasim/v10.3b/docs/pdfdocs/_bk_questa_sim.pdf &
12 fi

 

2  Three types of quotes

  1) doubel quotes (")

    Anything enclose in doubel quote removed meaning of that chatracter(except \ and $)

  2) single quotes (')

    Enclosed in single quotes remains unchanged.

  3) back quote (`)

    To execute command.

1 $ echo "Today is date"  
2 # Today is date
3 $ echo "Toaday is 'date'"
4 # Today is 'date'
5 $ echo "Today is `date`"
6 # Today is Fr 10. Jul 13:36:04 CEST 2015

你可能感兴趣的:(script)