几种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
文件名: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
相关文章推荐
- Linux执行SHELL脚本的几种方法
- Linux中执行shell脚本的4种方法总结
- 在linux下定时执行PHP脚本(定时执行crontab使用方法详解)
- 让Python脚本暂停执行的几种方法
- linux下robotframework执行测试用例的几种方法
- Linux操作系统下三种配置环境变量的方法(linux下几种profile执行顺序)
- Linux中执行shell脚本的4种方法总结
- 如何使用Linux的Crontab定时执行PHP脚本的方法
- linux中的脚本,手工执行正常,crond执行却无执行结果解决方法!
- 如何使用Linux的Crontab定时执行PHP脚本的方法
- Linux中执行shell脚本命令的4种方法总结
- Linux中执行shell脚本的4种方法总结
- Linux中执行shell脚本的4种方法
- 每天一个linux命令(62):sh命令 /Linux中执行shell脚本的4种方法总结
- Linux开机关机执行脚本方法
- 执行shell脚本的几种方法
- 在linux下定时执行PHP脚本(定时执行crontab使用方法详解)
- Linux中执行shell脚本的4种方法总结
- Linux中执行shell脚本的4种方法总结
- Linux中执行shell脚本的4种方法