Sponsored Content
Full Discussion: Help regarding shell script
Top Forums Shell Programming and Scripting Help regarding shell script Post 302494306 by mike12 on Sunday 6th of February 2011 08:14:28 PM
Old 02-06-2011
S,

I get the output as in post 39 but with the UID off from the output;
Code:
-rwxrwxr-x1 Func-Wireless-consumers  10 Jan 27 12:21 list.sh
-rwxr-x---    1 Func-Wireless-consumers  80 Jan 28 09:25 .desk

The problem here is in both of the previous codes the UID is not displaying my name MIKE045

Last edited by Scott; 02-07-2011 at 03:10 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Run a shell script from Perl script in Parent shell?

Hi Perl/UNIX experts, I have a problem in running a shell script from my perl script (auto.pl). I run the perl script using perl auto.pl from the shell prompt The shell script picks the files in "input" folder and procesess it. The shell script blue.sh has this code. export... (16 Replies)
Discussion started by: hifake
16 Replies

2. Shell Programming and Scripting

invoking a shell script inside cgi shell script

Hi, I have an HTML form through which I get some text as input. i need to run a shell script say script.sh inside a perl-cgi script named main_cgi.sh on the form input. I want to write the contents of the form in a file and then perform some command line operations like grep, cat on the text... (2 Replies)
Discussion started by: smriti_shridhar
2 Replies

3. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

4. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

5. Shell Programming and Scripting

Correct shell script to Call One shell script from another shell script

Hi All, I have new for shell scripting. Problem : I have one scrip at serv1 and path of server is /apps/dev/provimage/scripts and script name:extract_ancillary.bat. I need to call this script at server2(my working server) and execute at server2 . Please let me know how to build the... (5 Replies)
Discussion started by: Vineeta Nigam
5 Replies

6. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

7. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

8. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

9. Shell Programming and Scripting

Pass C shell array to another C shell script(csh) and shell(sh)

Dear Friends, Please help me on this my script name is send.csh In this i have written the statement like this set args = ( city state country price ) I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell or how to pass to... (2 Replies)
Discussion started by: SA_Palani
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script newbie- how to generate service log from shell script

Hi, I am totally a newbie to any programming languages and I just started an entry level job in an IT company. One of my recent tasks is to create a script that is able to show the log file of linux service (i.e. ntpd service) lets say, if I run my script ./test.sh, the output should be... (3 Replies)
Discussion started by: xiaogeji
3 Replies
erl_eval(3erl)						     Erlang Module Definition						    erl_eval(3erl)

NAME
erl_eval - The Erlang Meta Interpreter DESCRIPTION
This module provides an interpreter for Erlang expressions. The expressions are in the abstract syntax as returned by erl_parse , the Erlang parser, or a call to io:parse_erl_exprs/2 . EXPORTS
exprs(Expressions, Bindings) -> {value, Value, NewBindings} exprs(Expressions, Bindings, LocalFunctionHandler) -> {value, Value, NewBindings} exprs(Expressions, Bindings, LocalFunctionHandler, NonlocalFunctionHandler) -> {value, Value, NewBindings} Types Expressions = as returned by erl_parse or io:parse_erl_exprs/2 Bindings = as returned by bindings/1 LocalFunctionHandler = {value, Func} | {eval, Func} | none NonlocalFunctionHandler = {value, Func} | none Evaluates Expressions with the set of bindings Bindings , where Expressions is a sequence of expressions (in abstract syntax) of a type which may be returned by io:parse_erl_exprs/2 . See below for an explanation of how and when to use the arguments LocalFunc- tionHandler and NonlocalFunctionHandler . Returns {value, Value, NewBindings} expr(Expression, Bindings) -> { value, Value, NewBindings } expr(Expression, Bindings, LocalFunctionHandler) -> { value, Value, NewBindings } expr(Expression, Bindings, LocalFunctionHandler, NonlocalFunctionHandler) -> { value, Value, NewBindings } expr(Expression, Bindings, LocalFunctionHandler, NonlocalFunctionHandler, ReturnFormat) -> { value, Value, NewBindings } | Value Types Expression = as returned by io:parse_erl_form/2, for example Bindings = as returned by bindings/1 LocalFunctionHandler = {value, Func} | {eval, Func} | none NonlocalFunctionHandler = {value, Func} | none ReturnFormat = value | none Evaluates Expression with the set of bindings Bindings . Expression is an expression (in abstract syntax) of a type which may be returned by io:parse_erl_form/2 . See below for an explanation of how and when to use the arguments LocalFunctionHandler and Nonlo- calFunctionHandler . Returns {value, Value, NewBindings} by default. But if the ReturnFormat is value only the Value is returned. expr_list(ExpressionList, Bindings) -> {ValueList, NewBindings} expr_list(ExpressionList, Bindings, LocalFunctionHandler) -> {ValueList, NewBindings} expr_list(ExpressionList, Bindings, LocalFunctionHandler, NonlocalFunctionHandler) -> {ValueList, NewBindings} Evaluates a list of expressions in parallel, using the same initial bindings for each expression. Attempts are made to merge the bindings returned from each evaluation. This function is useful in the LocalFunctionHandler . See below. Returns {ValueList, NewBindings} . new_bindings() -> BindingStruct Returns an empty binding structure. bindings(BindingStruct) -> Bindings Returns the list of bindings contained in the binding structure. binding(Name, BindingStruct) -> Binding Returns the binding of Name in BindingStruct . add_binding(Name, Value, Bindings) -> BindingStruct Adds the binding Name = Value to Bindings . Returns an updated binding structure. del_binding(Name, Bindings) -> BindingStruct Removes the binding of Name in Bindings . Returns an updated binding structure. LOCAL FUNCTION HANDLER
During evaluation of a function, no calls can be made to local functions. An undefined function error would be generated. However, the optional argument LocalFunctionHandler may be used to define a function which is called when there is a call to a local function. The argu- ment can have the following formats: {value,Func} : This defines a local function handler which is called with: Func(Name, Arguments) Name is the name of the local function (an atom) and Arguments is a list of the evaluated arguments. The function handler returns the value of the local function. In this case, it is not possible to access the current bindings. To signal an error, the function handler just calls exit/1 with a suitable exit value. {eval,Func} : This defines a local function handler which is called with: Func(Name, Arguments, Bindings) Name is the name of the local function (an atom), Arguments is a list of the unevaluated arguments, and Bindings are the current vari- able bindings. The function handler returns: {value,Value,NewBindings} Value is the value of the local function and NewBindings are the updated variable bindings. In this case, the function handler must itself evaluate all the function arguments and manage the bindings. To signal an error, the function handler just calls exit/1 with a suitable exit value. none : There is no local function handler. NON-LOCAL FUNCTION HANDLER The optional argument NonlocalFunctionHandler may be used to define a function which is called in the following cases: a functional object (fun) is called; a built-in function is called; a function is called using the M:F syntax, where M and F are atoms or expressions; an oper- ator Op/A is called (this is handled as a call to the function erlang:Op/A ). Exceptions are calls to erlang:apply/2,3 ; neither of the function handlers will be called for such calls. The argument can have the following formats: {value,Func} : This defines an nonlocal function handler which is called with: Func(FuncSpec, Arguments) FuncSpec is the name of the function on the form {Module,Function} or a fun, and Arguments is a list of the evaluated arguments. The function handler returns the value of the function. To signal an error, the function handler just calls exit/1 with a suitable exit value. none : There is no nonlocal function handler. Note: For calls such as erlang:apply(Fun, Args) or erlang:apply(Module, Function, Args) the call of the non-local function handler corresponding to the call to erlang:apply/2,3 itself-- Func({erlang, apply}, [Fun, Args]) or Func({erlang, apply}, [Module, Function, Args]) --will never take place. The non-local function handler will however be called with the evaluated arguments of the call to erlang:apply/2,3 : Func(Fun, Args) or Func({Module, Function}, Args) (assuming that {Module, Function} is not {erlang, apply} ). Calls to functions defined by evaluating fun expressions "fun ... end" are also hidden from non-local function handlers. The nonlocal function handler argument is probably not used as frequently as the local function handler argument. A possible use is to call exit/1 on calls to functions that for some reason are not allowed to be called. BUGS
The evaluator is not complete. receive cannot be handled properly. Any undocumented functions in erl_eval should not be used. Ericsson AB stdlib 1.17.3 erl_eval(3erl)
All times are GMT -4. The time now is 09:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy