您的位置:首页 > 运维架构 > Linux

几种linux脚本的简单执行方法

2013-12-09 10:51 204 查看
1.hash脚本
文件名:assign

内 容:
#!/bin/sh

cd $1
ls

执行:
[root@db2 ~]# sh helle2.sh /usr
或者[root@db2 ~]#./helle2.sh /usr

输出结果:
bin etc games include lib lib64 libexec local sbin share src tmp

2.perl脚本

首先要安装perl:yum install perl
文件名:hello.pl
内容:
#!/usr/bin/perl
print"Hello World"

执行:[root@db2 ~]# perl hello.pl
或者[root@db2 ~]# ./hello.pl
输出:Hello World

相关文章:http://blog.csdn.net/zzq900503/article/details/12850379
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: