Sponsored Content
Top Forums Shell Programming and Scripting How to source a file in KSH -- Please help !!! Post 302082490 by tmarikle on Wednesday 2nd of August 2006 02:50:24 PM
Old 08-02-2006
. /home/tipsy/sourceme.prf
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Post Shell programming: Question about source a file and read data from the file

This is shell programming assignment. It needs to create a file called .std_dbrc contains STD_DBROOT=${HOME}/class/2031/Assgn3/STD_DB (which includes all my simple database files) and I am gonna use this .std_dbrc in my script file (read the data from the database files) like this: .... (3 Replies)
Discussion started by: ccwq
3 Replies

2. Shell Programming and Scripting

What is the ksh alternative of source

# type source source is a shell builtin What is the kshell alternative of source? I want to run a ksh script in the parent shell rather than creating a child shell. (1 Reply)
Discussion started by: proactiveaditya
1 Replies

3. Shell Programming and Scripting

extracting columns using pattern file from source file

Hi experts,Please help me for the below requirement. i have a source file.(lets say contains 50 columns). I am extarcting five columns from the source file by using pattern file. for example input file:--------a,b,c,d,"a,g","v b",s,koutputfile=======a,"a,g","v b",s,kThanks in advance subhendu (2 Replies)
Discussion started by: subhendu81
2 Replies

4. Shell Programming and Scripting

rsync - update file on backup when file renamed on source

hi all, Please help me with rsync. I configured rsync to preserve timestamps using the -a option. When i renamed fileA to fileB on source machine I have to copies at the backup server. The aim is to keep the most recent file. fileA & fileB has same contents. When i renamed fileB to... (2 Replies)
Discussion started by: coolatt
2 Replies

5. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

6. Shell Programming and Scripting

ksh script to create a generic csv file from different source formats

Hi all, I have a requirement to create a "superset" file out of a number of different sources with some different and some same columns. We intend to have a manually updateable SuperSetCols.csv which would look like "ColA","ColB","ColC","ColD","ColE","ColF","ColG" so someday we may add... (3 Replies)
Discussion started by: Leedor
3 Replies

7. Programming

how to copy downloaded file into my source file folder (putty/unix)

I need to "Ensure that when you download libchat.a from the VLE you have copied it to the same folder on ius as your source files. You then refer to the library (and the libraries it needs) with: gcc -o outputfile sourcefile.c -L. -lchat -lsocket -lnsl" But I have no idea what this means! (I... (2 Replies)
Discussion started by: fakuse
2 Replies

8. Shell Programming and Scripting

Split File by Pattern with File Names in Source File... Awk?

Hi all, I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example: ... (2 Replies)
Discussion started by: cul8er
2 Replies

9. UNIX for Dummies Questions & Answers

Match the amount fields in the source file vs trigger file

Hello, I have to write a script to compare the sum of the amount fields in a source file and the amount field in another file. details are: based on the name of the source file (say SALES as an example), a file already available in a path will be grabbed (say SALES_ParmFile) and this file... (4 Replies)
Discussion started by: vijaylak
4 Replies
unwind(3)						     Library Functions Manual							 unwind(3)

NAME
unwind, exc_virtual_unwind, RtlVirtualUnwind, exc_find_frame_ptr, exc_remote_virtual_unwind - Routines to unwind a context SYNOPSIS
#include <excpt.h> void unwind( PCONTEXT pcontext, PRUNTIME_FUNCTION prf); void exc_virtual_unwind( PRUNTIME_FUNCTION prf, PCONTEXT pcontext); exc_address RtlVirtualUnwind( exc_address controlpc, PRUNTIME_FUNCTION prf, PCONTEXT pcontext, PCONTEXT_POINTERS ppointers); exc_address exc_find_frame_ptr( PRUNTIME_FUNCTION prf, PCONTEXT pcontext); PCONTEXT pnext_context); unsigned long exc_remote_virtual_unwind ( void *handle, int (*fetch_from_process) ( void *handle, void *addr, void *buffer, long size), exc_address crd_handle, PRUNTIME_FUNCTION pcrd, PCONTEXT pcontext); PARAMETERS
Pointer to a struct sigcontext (see signal(2)) used to represent a procedure's context. Pointer to a struct sigcontext (see signal(2)) used to represent the context of a procedure's caller. If you specify a nonzero pnext_context argument, the pcontext argument is ignored. Pointer to run-time function (code-range descriptor) for the PC stored in the sc_pc field of the activation context record; a call to exc_lookup_function_entry returns this value. Although this argument can be zero, by providing this argument, a caller already having this information would save an extra search for the run-time function. Copy of the sc_pc field of the activation context record. Pointer to structure containing addresses corresponding to the locations that were used to restore registers; if zero, this argument is ignored. The following descriptions apply to parameters for the exc_remote_virtual_unwind routine. How these parameters are interpreted depends on whether the process involved in the operation is local or remote. Remote unwind: A pointer to an arbitrary block of memory, set up and managed by the user application, and passed throught the exception handling routines. This allows the author of the function identified by the fetch_from_process parameter to maintain any necessary state. The state maintained here will most likely include the identity of the process to be unwound. Local unwind: This parameter is ignored. Remote unwind: The address of an application-specific function, written by the author of the application that calls exc_remote_virtual_unwind(). If the value of the fetch_from_process parameter is NULL, the unwind takes place in the local process, not a remote process. The function identified by the fetch_from_process parameter takes the following arguments: The handle parameter that was passed into exc_remote_virtual_unwind. The starting address in the remote process from which to copy memory. A buffer in the local process into which data from the remote process is copied. The number of bytes to copy from addr to buffer. The region of memory pointed to by buffer must be at least size bytes in length. The function identified by the fetch_from_process parameter returns 0 (zero) to indicate success and nonzero to indicate a failure in accessing the remote address space. A failure will also cause an exception status to be raised. Local unwind: The fetch_from_process parameter is ignored. Remote unwind: The address of the cell exc_crd_list_head in the remote process. The means by which this address is communicated to the local (tracing) process is application specific. Local unwind: This parameter is ignored. Remote unwind: This parameter is ignored. Local unwind: The address of a code-range descriptor describing the context from which to begin the unwind. If NULL, the code-range descriptor is looked up based on the PC contained in the pcontext parameter. This is often passed as NULL for the initial invoca- tion of exc_remote_virtual_unwind() and is always passed as NULL for iterated invocations during the stack walk. A pointer to a struct sigcontext representing the context of the procedure (local or remote) that is to be unwound. At a minimum, this context structure must contain the following context for the routine to be unwound: FP register ($15), SP regis- ter ($30), RA register ($26 in a standard call), and the PC. Additionally, the context may contain the preserved registers. This argument needs to be set up only once; consecutive calls to exc_remote_virtual_unwind() manipulate this structure to represent the state of successively earlier procedures in the call chain. DESCRIPTION
All of the unwind routines perform a virtual unwind. Unlike the routines described in exc_resume(3), these routines do not actually unwind a procedure call by modifying the real registers and other machine state. Instead, these routines modify the structure pointed to by the pcontext argument so that it represents the previous procedure in the call stack. The routines use procedure information supplied in the structure pointed to by the prf argument to decide how to virtually unwind the context (for instance, how to modify the registers and other machine state). This information is placed in the object by the assembler and linker and conforms to the calling standard for Alpha sys- tems. If the specify a procedure's context in pcontext and the pnext_context argument is non-zero, exc_find_frame_ptr generates a copy of the pcontext argument. The original copy of the context is not modified. If you supply a pointer to the context of the caller in the pnext_context argument, exc_find_frame_ptr returns the stack pointer associated with that context as the frame pointer of the current con- text. The other unwind routines modify the structure pointed to by the pcontext argument in order to represent the context of the caller. Remote unwinding by the exc_remote_virtual_unwind function can involve a local or remote process - unlike the unwind, exc_virtual_unwind, and RtlVirtualUnwind functions that operate only on local processes. Remote unwinding is controlled by the fetch_from_process parameter. This parameter is a pointer to (or handle for) an application-supplied function that knows how to access the memory of the process (local or remote) being acted on: If the user application passes a NULL value in the fetch_from_process parameter, the local process is performing an unwind on its own stack. This allows the unwind routine to make certain optimizations in its processing. If the user application passes the address of a routine in the fetch_from_process parameter, the unwind routine is not allowed to assume anything about the process it is accessing, and only the fetch routine is allowed to know the identity of the process being unwound. It might be the local process, it might be another process in the system, it might be a process on another system on the network, or it might be a corefile from a long- deceased process. To summarize, remote unwinding is the capability to unwind the stack of a process that is not necessarily the process doing the unwind. The exc_remote_virtual_unwind function returns 1 to indicate that the program being unwound was in the prologue or epilogue of the frame for the current context; otherwise, it returns 0. All of the unwind routines typically use masks and stack offsets found in procedure related data structures (described in the Calling Stan- dard for Alpha Systems) to restore registers. Those data structures also can contain enough information for these routines to adequately deal with prologues, epilogues, and signal frames. Users writing assembly language routines should consult the Assembly Language Programmer's Guide to determine which directives are required to provide enough information for these routines to correctly unwind through them. Note The origins of the various unwind routines are as follows: unwind originated in the ULTRIX libexc and has an interface compatible with the original one, as long as the ULTRIX caller treated the prf argument as an opaque pointer. The prf structure has been changed to conform to the calling standard for Alpha systems, and any callers that explicitly access its fields will encounter incompatibilities. exc_vir- tual_unwind originated in libexc. RtlVirtualUnwind is a Microsoft Windows NT run-time library interface. It returns a copy of the updated sc_pc field of the sigcontext when leaving the routine. The routine also updates the structure pointed to by the ppointers argument. FILES
usr/ccs/lib/cmplrs/cc/libexc.a - exception handling library usr/include/excpt.h - include file usr/include/pdsc.h - include file usr/include/signal.h - include file usr/include/machine/fpu.h - include file RELATED INFORMATION
Functions: exception_intro(3), exception_dispatcher(3), exc_lookup_function_entry(3), signal(2), sigaction(2), setjmp(3), exc_unwind(3), __exc_last_chance(3), ieee(3). Files: excpt(4), c_excpt(4), signal(4), pdsc(4). Assembly Language Programmer's Guide. Calling Standard for Alpha Systems. delim off unwind(3)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy