Sponsored Content
Top Forums Shell Programming and Scripting display result from user input Post 302163103 by ghostdog74 on Thursday 31st of January 2008 04:11:21 AM
Old 01-31-2008
Code:
awk 'BEGIN{
 printf "%s : " ,"What Pid"
 getline pid <"-" 
}
$1==pid'  "file"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display result one page at a time

hi how can i display the result on the screen one page at a time? say i search for .txt files and return the result on the screen one page at a time. (4 Replies)
Discussion started by: nickaren
4 Replies

2. UNIX for Dummies Questions & Answers

display the result of wc -l with words before and after the result

hello showrev -p | wc -l returns: 381 What to do in case I want to have this output: number of lines returned by showrev -p is: 381 thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

3. Shell Programming and Scripting

Pick up the return code for every iteration and display the result only once in loop.

Hi All, I amlearning UNIX scripting. I have a small query. I would be thankful if any one helps me out. I have a below piece of code which delets the files. If file dosent have the permissions to delete a particular file I have used 2>>operator to track the error code. But my objective is... (1 Reply)
Discussion started by: manas6
1 Replies

4. Shell Programming and Scripting

csh script to search for files and display result

Hello all. I'm a long time browser, first time poster...Be gentle :-) I don't use csh much, but have been asked to make a small script for our HP-UX systems to search for a report file(s) or summary file and display the result (I was using vuepad, but this probably is just complicating... (4 Replies)
Discussion started by: neillsm
4 Replies

5. UNIX for Dummies Questions & Answers

How to display values from user input array?

Hi all, I wrote a script that reads inputs from user and store in array named "input". The number of elements in the array is not fixed - determined only after user exit the while loop that reads the array values : x=1 echo "Enter first value" read input while } != "exit" ] do ... (1 Reply)
Discussion started by: luna_soleil
1 Replies

6. Shell Programming and Scripting

How to get the user input recursively until the user provides valid input

Hi, echo "Enter file name of input file list along with absolute path : " read inputFileList if then for string in `cat inputFileList` do echo $string done else echo " file does not exist" fi From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies

7. Shell Programming and Scripting

display Range of date depend on user input php

Hi, i am very new to php Is it possible to display Range of date depend on user input day example: user input 2 day start from 28/4/12 it will add 2 day from date of input so display should look like this 28/4/12 to 30/4/12 then from 30/412 user add another 4 date so will... (0 Replies)
Discussion started by: guidely
0 Replies

8. Shell Programming and Scripting

Bash script to display result in table

My script gives the following result. Is it possible to display the same in table format ? 1. rex_best Latest feeds are not avaialable. The last feed was generated on 2012-05-17 File Name = ekb_best_20120517_010949_665.tar.gz The Number of entry elements = 4209539 2. rex_genre Latest... (2 Replies)
Discussion started by: kishorekumar87
2 Replies

9. UNIX for Dummies Questions & Answers

Japanese layout input. Help to get result with uim? (X)

It's easy but I'm searching how to work with fonts (besides) emerging them. /etc/conf.d/consolefont (consolefont=" ") - what to write after install, m.b. paths are wrong (emerged /usr/share/fonts/efont-unicode/*.gz). Has it any relation to X11 hieroglyph input?:wall: (1 Reply)
Discussion started by: Xcislav
1 Replies

10. Shell Programming and Scripting

awk to parse file and display result based on text

I am trying using awk to open an input file and check a column 2/field $2 and if there is a warning then that is displayed (variantchecker): G not found at position 459, found A instead. The attached Sample1.txt is that file. If in that column/field there is a black space, then the text after... (6 Replies)
Discussion started by: cmccabe
6 Replies
supervisor_bridge(3erl) 				     Erlang Module Definition					   supervisor_bridge(3erl)

NAME
supervisor_bridge - Generic Supervisor Bridge Behaviour. DESCRIPTION
A behaviour module for implementing a supervisor_bridge, a process which connects a subsystem not designed according to the OTP design principles to a supervision tree. The supervisor_bridge sits between a supervisor and the subsystem. It behaves like a real supervisor to its own supervisor, but has a different interface than a real supervisor to the subsystem. Refer to OTP Design Principles for more informa- tion. A supervisor_bridge assumes the functions for starting and stopping the subsystem to be located in a callback module exporting a pre- defined set of functions. The sys module can be used for debugging a supervisor_bridge. Unless otherwise stated, all functions in this module will fail if the specified supervisor_bridge does not exist or if bad arguments are given. EXPORTS
start_link(Module, Args) -> Result start_link(SupBridgeName, Module, Args) -> Result Types SupBridgeName = {local,Name} | {global,Name} Name = atom() Module = atom() Args = term() Result = {ok,Pid} | ignore | {error,Error} Pid = pid() Error = {already_started,Pid} | term() Creates a supervisor_bridge process, linked to the calling process, which calls Module:init/1 to start the subsystem. To ensure a synchronized start-up procedure, this function does not return until Module:init/1 has returned. If SupBridgeName={local,Name} the supervisor_bridge is registered locally as Name using register/2 . If SupBridgeName={global,Name} the supervisor_bridge is registered globally as Name using global:register_name/2 . If no name is provided, the supervisor_bridge is not registered. If there already exists a process with the specified SupBridgeName the function returns {error,{already_started,Pid}} , where Pid is the pid of that process. Module is the name of the callback module. Args is an arbitrary term which is passed as the argument to Module:init/1 . If the supervisor_bridge and the subsystem are successfully started the function returns {ok,Pid} , where Pid is is the pid of the supervisor_bridge. If Module:init/1 returns ignore , this function returns ignore as well and the supervisor_bridge terminates with reason normal . If Module:init/1 fails or returns an error tuple or an incorrect value, this function returns {error,Term} where Term is a term with information about the error, and the supervisor_bridge terminates with reason Term . CALLBACK FUNCTIONS
The following functions should be exported from a supervisor_bridge callback module. EXPORTS
Module:init(Args) -> Result Types Args = term() Result = {ok,Pid,State} | ignore | {error,Error} Pid = pid() State = term() Error = term() Whenever a supervisor_bridge is started using supervisor_bridge:start_link/2,3 , this function is called by the new process to start the subsystem and initialize. Args is the Args argument provided to the start function. The function should return {ok,Pid,State} where Pid is the pid of the main process in the subsystem and State is any term. If later Pid terminates with a reason Reason , the supervisor bridge will terminate with reason Reason as well. If later the super- visor_bridge is stopped by its supervisor with reason Reason , it will call Module:terminate(Reason,State) to terminate. If something goes wrong during the initialization the function should return {error,Error} where Error is any term, or ignore . Module:terminate(Reason, State) Types Reason = shutdown | term() State = term() This function is called by the supervisor_bridge when it is about to terminate. It should be the opposite of Module:init/1 and stop the subsystem and do any necessary cleaning up. The return value is ignored. Reason is shutdown if the supervisor_bridge is terminated by its supervisor. If the supervisor_bridge terminates because a a linked process (apart from the main process of the subsystem) has terminated with reason Term , Reason will be Term . State is taken from the return value of Module:init/1 . SEE ALSO
supervisor(3erl) , sys(3erl) Ericsson AB stdlib 1.17.3 supervisor_bridge(3erl)
All times are GMT -4. The time now is 12:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy