ChinaUnix.net
相关文章推荐:

shell 函数调用函数

a.sh[code]#!/bin/bash function aa() { echo "aa" } echo "bb" [/code]如果b.sh写成[code]#!/bin/bash source a.sh [/code]这样就会输出: aa bb 现在只想输出aa,不想输出bb需要怎么做?

by esbat - Shell - 2012-05-02 18:31:53 阅读(1473) 回复(2)

相关讨论

一个shell脚本,一个perl脚本 如何将两个脚本整合到一个脚本中 或者在shell中如何调用perl脚本

by myeros - Shell - 2012-01-05 14:42:47 阅读(4452) 回复(6)

在AWK中怎么调用shell函数,此shell函数后面要跟4个参数

by gxxiaotian - Shell - 2014-01-27 11:00:47 阅读(6894) 回复(17)

shell是否可以调用python函数,如何调用?请多指点谢谢!

by q496518957 - Shell - 2012-06-02 03:19:39 阅读(5137) 回复(3)

比如下面的shell脚本文件: #===========test.sh: #! /bin/sh echo_line() { echo date echo "Wellcome to shell func!" } echo_hello() { echo "Hello World!" } #====================== 怎么在shell调用以上两个函数啊? 为什么我用【./test.sh echo_hello】却什么也没有输出? 当然,我已经给test.sh加了可执行权限了。

by apple_7095 - Linux环境编程 - 2013-11-03 01:39:48 阅读(2439) 回复(4)

各位大大~~~~大家辛苦了 小弟发一个脚本 ……………………………………………………………… function PING_STATUS () { local _ipadd _ipadd=$1 PING_COUNT=`ping -c 4 $1` if [ $? -eq 0 ];then # return 0 echo "ping is ok" #ping success elif [ $? -ne 0 ];then # return 1 echo "ping is error" #ping error fi } PING_STATUS $IP …………………...

by ppiqq - Shell - 2008-12-18 12:31:59 阅读(4779) 回复(16)

shell里,有2个函数: a() { export a b c echo -e "input" read a b c } b() {export a b c echo -e "input" read a b c } 我想另外些个函数代替 a 和 b中的共同语句,并且在 a,b中调用,怎么做啊?

by fwloveme - Shell - 2007-09-02 17:15:18 阅读(1590) 回复(2)

如题! 函数已经定义! :oops: :oops: :oops: PS:刚刚学习shell!!!

by xy-coordinate - Shell - 2005-09-19 08:15:00 阅读(1089) 回复(3)
by atgfgd - Shell - 2004-05-24 10:55:11 阅读(1423) 回复(3)

如何在子shell调用shell函数? 变量可以用export声明,函数怎么弄? 谢谢

by 机器娃娃 - Shell - 2005-05-24 22:38:40 阅读(1328) 回复(1)

同主题,谢谢了,提供个思路或例子都可以

by supersuper - Shell - 2005-06-23 14:29:01 阅读(2951) 回复(3)