I counld not run script properly.
If I run
-sharp!/bin/sh
echo "Hello.World"
It"s good.
But
-sharp!/bin/sh
sudo su
apt-get update
apt-get upgrade
It failed.
What do I need extra ?
Thank you.
update:
I counld not run script properly.
If I run
-sharp!/bin/sh
echo "Hello.World"
It"s good.
But
-sharp!/bin/sh
sudo su
apt-get update
apt-get upgrade
It failed.
What do I need extra ?
Thank you.
update:
because you are not familiar with linux,
, you edit files under windows and send them to ssh
.
the editor I use here is not simply "0A" but "0A0D" mixed with "0D" to cause the linux script recognition error.
Previous: Iptables shell failed
Next: Nginx system how to write 301redirect to access the former is not 404 pages but can open the latter?
-sharp! bin sh filesize=`ls -l nohup.out | awk { print $5 } ` echo "`date +%Y-%m-%d_%H:%M:%S` fileSize: $filesize bit" >> clearNohup.log if [ $filesize -gt 1073741824 ] then echo "`date +%Y-%m-%d_%H:%M:%S` $filesize bigger t...
as follows, ps-ef | grep tproxy | grep-v "grep " command will get tproxy process information, user00 1561 1 0 Apr03 ? 00:01:00 . tproxy --id=1.1.0.6 --port=6001 --conf-file=.. etc proxy.xml --sys-file=.. etc tproxy_sys.xml --env-type=...
if so, what is the meaning of : in parallel-k echo: A B C > abc_file ? What s the effect? ...
-sharp! bin bash file_name2=`date +%Y%m%d%H%M%S` mkdir home sql_bak user_bak $file_name2 chmod 7777 home sql_bak user_bak $file_name2 -sharp-sharp-sharp-sharp arr_string=(users payrecord_fruitcoin yamirecord vipexam_record stream_order io...
I encapsulated a cat etc shadow command in C language, set the suid bit of the program and set its owner to root,. Why can t you access etc shadow? when executed as an ordinary user? Is it possible that exec doesn t inherit the suid property when ...
the "working environment " here refers to, for example, different namespaces or even interactive environments for different programs. for example, after 1:Docker creates a container a, you can enter the interactive environment of a to perform the confi...
there are two steps to start OVS on ovs s official website, as follows: $ export PATH=$PATH: usr local share openvswitch scripts $ ovs-ctl start there is no problem with executing these two sentences separately in the terminal, but when I want to pu...
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"...
Process process = null; process = RunTime.getRunTime (). Exec ( "cp aa.txt bb.txt "); process.waitFor (); I want to execute the shell command in java and find this function on the Internet, but I have tested it several times. Isn t the process.wait...
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...
The scenario is that I want to open two terminals in a shell script to see both A log and B log at the same time. ...
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...
recently, I suddenly found an abnormal cpu occupation of an Ali CVM, and there are many login failures in a short period of time. Does anyone know? top tmp qW3xT ...
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 - ...
there is a CSV, that lists the time. I want to count the number of rows that appear every ten minutes (or every 30 minutes). For example, how many pieces are there in 00-00-00-00-09 and 00-00-00-00-19? Count by linux. ...
I use ssh-copy-id "-p $SERVERPORT -i home $USERNAME .ssh vpn-server.key.pub $SERVERUSERNAME@$SERVERIPV4" or ssh-copy-id -i home $USERNAME .ssh vpn-server.key.pub "-p $SERVERPORT $SERVERUSERNAME@$SERVERIPV4" is not correct ...
take easyrsa. I remember it was 2 at first, and then 3 . If 3, the directory originally copied has the version number, and the latest usr share easy-rsa file directory has changed, and the version number has been moved to a subdirectory. so it cha...
quote= " ; function t() { echo "${1}" echo "${2}" echo "${3}" } a="xxx yyy"; b="yyy zzz"; c="aaa.bbb"; cmd= t ${quote}${a}${quote},${quote}${b}${quote},${quote}${c}${quote} ev...
I tried to change the easyrsa script local work_dir="${EASYRSA:-$err_source}" local pki_dir="${EASYRSA_PKI:-$err_source}" set_var EASYRSA "${0% *}" none of these three works. it is also wrong to try the script ...
< H2 > if the jar program is executed with different terminals, the args content received by main will be inconsistent < H2 > The code is simple: print the args content in turn from the results, git bash swallowed -- dw-hive-auth= after the...