I have few functions which do some things which i have programmed to do. I want them to use that functions anytime i want. Right now if i need to use that function i have to copied that to putty and then call that function. Is it possible to do that so that i don't need to call that function. And i can use that function like unix commands.
It is a little unclear what you want. I am guessing that you have written some functions that you might want to call from the shell command prompt any time, rather than having to write a script, define them in there and call them how you need each time.
I think that if you have these functions in a file (let's call it myfunctions) then you are wanting to make them available to the current shell. Try:-
The leading "dot space" is important. This will execute the myfunctions file and load any functions to the current shell, so if you had:-
Then you could do the following:-
Is that the sort of thing you are after? If not, then do reply and explain where I have completely missed the point.
I hope that this helps
Robin
Liverpool/Blackburn
UK
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Hi friends,
I hope everyone is fine and doing well. I am facing this irritating problem. As you know that manual pages are available for both unix commands and c functions. Now when I try to check the manual pages for functions like
read
write
exit
I get the manual pages for the... (3 Replies)
:wall:i'm system administrator. now i have a trouble. i want to fetch the command which the login users performed by shell.but i don't know how to process this problem.if anyone tell me how to do this work I would be very grateful.thank you! (4 Replies)
hello all,
i'm a beginner in linux programming. I need to know what is the difference between system calls and normal functions like fopen, fread etc in C?Also how to set permissions by using open system call? (11 Replies)
Am actually am new to the linux operating system and knda wana knw more about it.Please could u help me with some commands so i can start with that first.Really need your help (5 Replies)
Hi guys
i wanna to buil small pro as calc to do many things
for example
clear memory
specify a memory register
and so on
and quit
using scripting language like perl or awk
which command i use to deal with memory like m0 and how to clear or specify regester... (2 Replies)
Hey Guyz,
I am preparing an inventory kindof thing about the aix servers.. I need help to find out the below details for many AIX servers..
Machine model and version
Disk Size
RAM size
no. of CPUs and thier information
list of softwares installed
I searched in web.. but not much info I... (4 Replies)
Hi Friends,
I am trying to execute rsh commands from Solaris 10 system to AIX system.
When I give;
Solaris10# rsh <hostname> ls -l , it gives me an error
rshd : 0826-826 The host name for your address is not known
At the same time,
Solaris10# rsh <hostname> ---- gives me remote shell of... (25 Replies)
Hi,
I want to find some information regarding system specs such as CPU speed, total disk space, total RAM, network topology eg. ethernet, patch number, OS patches, database. Thanks (2 Replies)