How to define a bash function for use in any script?
来源:互联网 发布:淘宝网平板电脑大全 编辑:程序博客网 时间:2024/05/30 05:42
0down vote
Place your "common" function in a separate script (let's call it "a"):
#!/bin/bashtest_fun () { echo "hi"}
Next, "import" it into another script (say, "b"):
#!/bin/bash. ./atest_fun
Running bash b
will output "hi"
0down vote
Place your "common" function in a separate script (let's call it "a"):
#!/bin/bashtest_fun () { echo "hi"}
Next, "import" it into another script (say, "b"):
#!/bin/bash. ./atest_fun
Running bash b
will output "hi"
0 0
- How to define a bash function for use in any script?
- How to format date for display or to use in a shell script
- JS:Trim() in javascript, how to define a function of checkinput for a WebControl(ascx)
- How to use ActiveRecord in a ruby script outside Rails?
- linux, how to define a new array in bash
- How to use the pointer of function in a class?
- How to answer 'yes' in bash Script
- How to define hash tables in bash?
- How to use an ActiveX script task to create a loop in DTS
- Is there any way to define a min and max value for edittext in android?
- Bash tip: How to stop many processes in with a small script
- How to write a script in Linux
- How to run a script in ubuntu?
- The study of how to define a function in Python(20170907)
- how to use a foreach in Qt
- How to Use a QSqlQueryModel in QML
- How to use a Ramdisk for Linux
- How to create a function in SQL
- jsoncpp在linux下的配置
- WebService入门一、Hello WebService
- POJ 3087 Shuffle'm Up
- 【起点】跟我一起创建自己的第一个Android应用——HelloAndroid
- MFC文本编程
- How to define a bash function for use in any script?
- svn服务器更换
- 汇编语言 JMP CALL RET RETF的使用与区别
- MIT:算法导论——7.1.基本数据结构_栈、队列、链表、有根树
- git checkout之一 HEAD基本和detached 状态
- Mysql数据库备份的问题:mysqldump: Got error: 1049: Unknown database 'blog;' when selecting the database
- 安装mysql
- 解決git merge conflict
- 士大夫岁的法国大使馆反对广泛的