我正在尝试在Ubuntu 17.04(Zesty)上从存储库(6aa64)安装Frama-C gui Phosphorus.Frama-C opam运行正常,但据我所知它缺少GUI +我可能想稍后修补frama-C所以我希望能够自己编译它.
第一步:
./configure --enable-gui --enable-verbosemake
Run Code Online (Sandbox Code Playgroud)
生成输出:
configure: ******************
configure: * CONFIGURE MAKE *
configure: ******************
checking for make... make
checking version of make... 4.1
configure: *****************************
configure: * CONFIGURE OCAML COMPILERS *
configure: *****************************
checking for ocamlc... ocamlc
checking version of OCaml... 4.02.3
checking OCaml library path... /usr/lib/ocaml
checking for ocamlopt... ocamlopt
checking ocamlopt version and standard library... ok
checking for ocamlfind... ocamlfind
configure: Distribution mode: all warnings are deactivated
configure: *******************************************
configure: * CONFIGURE …Run Code Online (Sandbox Code Playgroud) 我想在这里使用bash doc语法来构建一个长字符串。我希望Heredoc忽略换行符/空格/制表符,即使我使用换行符来简化代码也是如此。
我认为这可以工作:
#!/bin/bash
#http://unix.stackexchange.com/questions/20035/how-to-add-newlines-into-variables-in-bash-script
IFS= read -r -d '' NS_LOG<<-EOF
*=error|warn|prefix_node|prefix_func
:PointToPointNetDevice
:ClockTest
:ClockPerfect
:TcpTestSuite
:TcpRxBuffer
:TcpTxBuffer
:TcpHeader=*
:TcpL4Protocol
:TraceHelper:PointToPointHelper
EOF
echo $NS_LOG
export NS_LOG
Run Code Online (Sandbox Code Playgroud)
但在某处bash在行之间添加空格,而不是所需的
*=error|warn|prefix_node|prefix_func:PointToPointNetDevice:ClockTest:ClockPerfect:Clock
Run Code Online (Sandbox Code Playgroud)
我在运行$ ./launch_myscript.sh时有:
*=error|warn|prefix_node|prefix_func :PointToPointNetDevice :ClockTest :ClockPerfect :Clock etc...
Run Code Online (Sandbox Code Playgroud)
我的bash --version:
GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)
Run Code Online (Sandbox Code Playgroud)
我只是在推荐的帖子中看到了这一Bash:为什么回声会增加额外的空间?。如何防止将NS_LOG视为多个参数?最终目标是导出该变量。