惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Vulnerabilities – Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
G
GRAHAM CLULEY
P
Privacy International News Feed
The Hacker News
The Hacker News
Forbes - Security
Forbes - Security
U
Unit 42
N
News and Events Feed by Topic
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cisco Blogs
A
About on SuperTechFans
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
I
Intezer
Spread Privacy
Spread Privacy
The Last Watchdog
The Last Watchdog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
F
Full Disclosure
S
Secure Thoughts
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
W
WeLiveSecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
Recorded Future
Recorded Future
Cyberwarzone
Cyberwarzone
S
Security Affairs
AWS News Blog
AWS News Blog
H
Help Net Security
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
Vercel News
Vercel News
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
S
Schneier on Security
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 最新话题
T
Tor Project blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog

博客园 - 白虎

软件架构设计的六大原则 Linux 安装npm 下载ECharts Linux 安装WebStorm Linux配置开机自启动执行脚本 Linux挂载第二块硬盘 Linux 安装Nginx Linux个性终端Oh my zsh Linux 8开启FTP功能服务 Jigloo 下载 安装 GUI Linux应用开发入门(转) NET(C#)连接各类数据库-集锦 C# 编写最小化时隐藏为任务栏图标的Window appllication 管理型交换机IEEE 802.1Q VLAN设置应用实例 Windows Server 2012如何实现双网卡绑定 多网卡的7种bond模式原理 For Linux Eplan中电缆源和目标的确定规则 Eplan 2D安装版布局,部件、端子竖放 EPLAN Electric P8 2.0即将到来,着实令人期待-转caodaping 关于STM32 CAN回环可用,正常不可用情况分析
Linux 第一个脚本程序
白虎 · 2021-02-16 · via 博客园 - 白虎

最近看了Linux命令行与Shell 编程脚本大全,第一个脚本写得很详细的。分享出来:

Step1 创建脚本文件Myshell

emacs Myshell

Step 2制作脚本文件 (第一行#!这个脚本程序的一部分,bash是关注的,需要注意,别乱写,第二行#代表注释,随便写。只要你两年之后还能来看)保存。

#!/bin/bash
#This script displays the date and whos logged on
date
who

step 3 

./Myshell
#显示没有权限

#因为Linux默认创建文件的权限都是不带执行的,对文件做以下处理

chmod u+x Myshell


#再次执行
./Myshell
#OK啦

白虎

     

Hello! I Am David.DU.

posted @ 2021-02-16 08:19  白虎  阅读(130)  评论(0)    收藏  举报

刷新页面返回顶部