Bash if statement can be used with regular expression

if [[ "hello world" =~ "hello" ]] ## this is true
then
    echo "'hello world' has 'hello'"
fi

if [[ "hello" =~ "hello world" ]] ## this is false
then
    echo "'hello' has 'hello world'"
fi

if [[ "hello world" =~ e.* ]] ## this is true
then
    echo "'hello world' has 'e' followed by any character"
fi

Note that

 - the bracket should be double

 - use "=~", not "~="

 - use the regular expression without quotation mark

 - the lefthand-side should be a container

'Programming > Bash Script' 카테고리의 다른 글

Bash script argument parsing with getopts  (0) 2020.01.23
Bash script for statement  (0) 2018.05.21
Bash Script case statement  (0) 2018.02.06
Bash Script Variable Split by Space  (0) 2018.02.04
Bash Script Echo  (0) 2018.02.04

When you are using very large concatenated signals in Vivado simulation, it may cause elaborate step failure. You can release this problem with breaking into several smaller signals.

 

AR# 62969 says it may be fixed in 2015.1 version, however, it still exists in 2017.2 version

www.xilinx.com/support/answers/62969.html

'Programming > Xilinx' 카테고리의 다른 글

SDK baremetal HW-time measurement  (0) 2021.12.07
SDK pointer vs array  (0) 2021.12.04
Vivado [Opt 31-67] Issue  (0) 2020.12.30
ZCU102 Evaluation Kit SODIMM issue  (0) 2020.12.21
UART terminal on remote RaspberryPI  (0) 2020.12.18

When you get [Opt 31-67] Problem from running Vivado opt_design phase, you have to check all the related input/output pins. If one of your input/output pins is not connected, it can occur. And also, even if you connect all the input/output pins, it can occur with a non-driving output pin.

'Programming > Xilinx' 카테고리의 다른 글

SDK pointer vs array  (0) 2021.12.04
ERROR: [USF-XSim-62] 'elaborate' step failed with errors  (0) 2021.01.14
ZCU102 Evaluation Kit SODIMM issue  (0) 2020.12.21
UART terminal on remote RaspberryPI  (0) 2020.12.18
Multi Hardware Server Issue  (0) 2020.12.18

+ Recent posts