Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How SecureCRT uses the rz command to upload shell scripts

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how SecureCRT uses the rz command to upload shell scripts. I hope you will get something after reading this article. Let's discuss it together.

Today, yum install-y lrzsz uses rz to upload local files, and executes the error message after uploading the shell script:

Give executable permissions

[root@csxf /] # cmhod+x auto_tomcat.sh

Execute shell script

[root@csxf /] #. / auto_tomcat.sh

-bash:. / auto_tomcat.sh: / bin/ Bash ^ M: bad interpreter: No such file or directory

The error prompt folder does not exist.

It is suspected that there is something wrong with the syntax structure of the script, so check that the syntax of the script is correct.

[root@csxf /] # sh-n auto_tomcat.sh

'uto_tomcat.sh: line 22: syntax error near unexpected token `

'uto_tomcat.sh: line 22: `function tomcat_stop ()

Take a closer look at line 22 of the script for no errors:

This error is a format problem, but works well on other machines

Later, the shell script was uploaded using the WinSCP tool, and everything was tested and executed normally.

After reading this article, I believe you have a certain understanding of "how SecureCRT uses rz commands to upload shell scripts". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report