when I was in regular grep, I couldn"t get its output. How to solve this situation:
echo "AAA<%=CCC=%>BBB" | grep -Po "<%=(.+?)=%>"
var=$(echo "AAA<%=CCC=%>BBB" | grep -Po "<%=(.+?)=%>")
echo $var
when I was in regular grep, I couldn"t get its output. How to solve this situation:
echo "AAA<%=CCC=%>BBB" | grep -Po "<%=(.+?)=%>"
var=$(echo "AAA<%=CCC=%>BBB" | grep -Po "<%=(.+?)=%>")
echo $var
this problem does not exist, but is caused by the use of mingw64, in the test environment. Thank you @ Feng_Yu for your kind reply.
definition of shell: -sharp! bin bash res=`2222222222 | md5sum | cut -d -f1` echo "res: " ${res} write in a file and run the result as follows: . sh-test.sh: line 3: 2222222222: command not found res: d41d8cd98f00b204e9800998ecf842...
defines a script B that receives two parameters, roughly logical: if [true]; then echo "12" exit 0; else echo "error" exit 0; fi exit 0; now call this script in another shell script A: RESULT=. B "para1"...
execute the following script in shell to download the file, prompting Download Fail:No connection adapters were found for http:.... but it is OK to take this command out and execute it alone. The script is as follows, which is a downloaded command...
question 1: subtitle of p33 page in the book: leave spaces and line breaks by quoting sub-shell. there are three lines in text.txt, with one number per line, such as 1 2 3 1 2 3 using out=$ (cat text.txt) echo $out to lose line feeds, and using t...
for example, I have a string variable that reads: AAA=<?= ${AAA}=?> BBB=<?= ${BBB}=?> <%=[ " ${Alias}" == "" ]=%> CCC= ${CCC} I want to implement regular substitution, generating the string as AAA=<?=${AAA...
my question is that I want to execute a script on the remote machine centos, and then search for the answer I see in stackoverflow: question where the method is: ssh root@MachineB bash -s < local_script.sh I have tried this method, but now...
USER=abbott SSH_AUTH_SOCK= private tmp com.apple.launchd.kLlEVaU801 Listeners PATH= usr local bin: usr bin: bin: usr sbin: sbin: Library Frameworks Python.framework Versions 3.7 bin: usr local mysql bin: usr local mongodb bin PWD= Users abbott UNIVER_MON...
< H2 > 1. The content in my environment-variable.ini file is < H2 >. export UNIVER_USER_LOGIN= http: 127.0.0.1 api login export UNIVER_SEARCH_ORDINARY= http: 127.0.0.1 api search common export UNIVER_SEARCH_LABEL= http: 127.0.0.1 api search c...
contents of environment-variable-mac.ini file UNIVER_USER_LOGIN= http: 127.0.0.1 api login UNIVER_SEARCH_ORDINARY= http: 127.0.0.1 api search common UNIVER_SEARCH_LABEL= http: 127.0.0.1 api search common UNIVER_SEARCH_VIDEO= http: 127.0.0...
export UNIVER_SEARCH_ORDINARY= http: 127.0.0.1 api search title export UNIVER_SEARCH_LABEL= http: 127.0.0.1 api search common export UNIVER_SEARCH_VIDEO= http: 127.0.0.1 api search result export UNIVER_SEARCH_UPLOAD= http: 127.0.0.1 api sea...
environment-variable-mac.ini file UNIVER_USER_LOGIN= http: 127.0.0.1 api login UNIVER_SEARCH_ORDINARY= http: 127.0.0.1 api search common UNIVER_SEARCH_LABEL= http: 127.0.0.1 api search common UNIVER_SEARCH_VIDEO= http: 127.0.0.1 api searc...
Novice shell, I want to read the variables in the environment-variable-mac.ini file and the templates in the setting.js, and then put both the variables and the setting.ini file in a newly generated setting.js file, both of which are in the configuratio...
the following is a string returned by the network. I want to parse this string in the shell script to get the value of fsize, that is, 13431719 what should I do? 2018-06-14 14:38:26,380 - DEBUG - wcscmd version 1.0.0 2018-06-14 14:38:26,381 - DEBUG - ...
execute the following command: ps aux | grep-n redis-server | grep-v grep the process information of redis-server can be found normally. (Note: grep-v grep is to exclude the process information of grep itself from the results) but write it as a...