当前位置:网站首页>【217】#!/ The meaning of usr/bin/env
【217】#!/ The meaning of usr/bin/env
2022-07-24 06:23:00 【wheat berry】

The subject part ( See official account for the original :python treasure )
python treasure
https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU5NjIyOTE4OQ==&scene=123#wechat_redirect
Wheat seedling DB treasure
https://www.xmmup.com/
Answer section
stay linux Some of bash Script for , You need to specify the interpreter of the script in the first line , Such as :
#!/usr/bin/env bash
#!/usr/bin/bash
#!/usr/bin/env python3
Tell the operating system to execute this script , call /usr/bin Under the python Interpreter ;
#!/usr/bin/python3
Tell the operating system to env Search in settings python Installation path for , Then call the interpreter program under the corresponding path to complete the operation 
What is the difference between the two forms ?
Script use env The reason for starting , Because the interpreter of the script may be installed in linux Different directories of ,env Can be in the system of PATH Look for . meanwhile ,env It also stipulates some system environmental quantities . If you directly write the interpreter path in the script , There may be compatibility problems in some systems where no interpreter can be found .
env It's in the system PATH Find the interpreter in the directory . meanwhile ,env It also specifies some system environment variables , See the link below for specific configuration , Can pass env Command view env Included content

Environment variable configuration

About Me: Wheat grains
● The author of this article : Wheat grains , Focus on python、 Data analysis 、 data mining 、 Machine learning related technologies , Also pay attention to the use of Technology
● Author's blog address :https://blog.csdn.net/u010986753
● The title of this series comes from the author's study notes , Partially collated from the network , If there is any infringement or improper place, please understand
● copyright , Welcome to share this article , Reprint please keep the source
● Personal micro signal :pythonbao Contact me and add wechat Group
● personal QQ:87605025
● QQ Communication group py_data :483766429
● official account :python treasure or DB treasure
● Provide OCP、OCM And the most practical skills training with high availability
● If there is anything wrong with the answer to the question , I also hope that you can criticize and correct , Common progress

If you find the article helpful , Click on my avatar below , Appreciate me !
With your support , The wheat grain will be better and better !
边栏推荐
- IP作业(6)
- Map the intranet to the public network [no public IP required]
- ++cnt1[s1.charAt(i) - ‘a‘];
- 记一次高校学生账户密码的获取,从无到有
- 【218】CS架构和BS架构以及数据放在服务端和客户端的利与弊?
- Dameng database_ Summary of supported data types
- IP作业(2)RIP
- Hololens2 development: use MRTK and simulate eye tracking
- Leetcode剑指offer JZ9 双栈实现队列
- Use intranet penetration to realize public network access to the Intranet
猜你喜欢

ue4 瞄准偏移

UE4 reload system 1. basic principle of reload system

Unity2d horizontal game jump real-time response

配置固定的远程桌面地址【内网穿透、无需公网IP】

Unity shader: realize diffuse reflection and specular reflection
![[no need for public IP] configure a fixed public TCP port address for remote desktop raspberry pie](/img/85/dec6a66dd10c35e2519bd240c05de1.png)
[no need for public IP] configure a fixed public TCP port address for remote desktop raspberry pie

【无需公网IP】为远程桌面树莓派配置固定的公网TCP端口地址

UE4 random generation of items

常见十大漏洞总结(原理、危害、防御)

10大漏洞评估和渗透测试工具
随机推荐
What is monotonic queue
IP job (6)
Do not rent servers, build your own personal business website (3)
IP笔记(12)
什么是单调栈
本地搭建WordPress个人博客,并内网穿透发布上线 (22)
Unity (III) three dimensional mathematics and coordinate system
Unity shader migrated from built-in rendering pipeline to URP
快速简单搭建FTP服务器,并内网穿透实现公网访问【无需公网IP】
力扣:1-两数之和
Flink production environment configuration recommendations
项目上复盘引导问题清单
UE4 aiming offset
EXCEL 生成mysql语句批量操作
Openpose2d transform 3D pose recognition
Data warehouse and data warehouse modeling
[no need for public IP] configure a fixed public TCP port address for remote desktop raspberry pie
How to build a website full of ritual sense and publish it on the public website 1-2
不租服务器,自建个人商业网站(3)
ue4 换装系统 2.换装系统的场景捕捉