Sponsored Content
Top Forums Shell Programming and Scripting Will files, creaetd in one function of the same script will be recognized in another function? Post 302992844 by jim mcnamara on Thursday 2nd of March 2017 10:30:21 AM
Old 03-02-2017
Pass the file name as an argument.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to do a function on all files in one run

Hello everybody I am trying to write a script in Cshell solaris 8 to read a number of files and do some commands on them (for example extracting some information) and send the results to one single file. I want to do that for all the files in one run. Could any body advise me on it. Thanks and... (5 Replies)
Discussion started by: Reza Nazarian
5 Replies

2. Shell Programming and Scripting

Passing global variable to a function which is called by another function

Hi , I have three funcions f1, f2 and f3 . f1 calls f2 and f2 calls f3 . I have a global variable "period" which i want to pass to f3 . Can i pass the variable directly in the definition of f3 ? Pls help . sars (4 Replies)
Discussion started by: sars
4 Replies

3. Shell Programming and Scripting

URGENT: Script/Function needed to read text property files in block wise

Hi, Iam in a need for a script/function in KSH where I want to read a text file (property file) in block by block. Here is the example: Heading Name Descripton Block Block1 Value1 Description Property Name Value Property Name Value Property Name Value Property Name Value Property Name... (7 Replies)
Discussion started by: ysreenivas
7 Replies

4. Shell Programming and Scripting

Return a value from called function to the calling function

I have two scripts. script1.sh looks -------------------------------- #!/bin/bash display() { echo "Welcome to Unix" } display ----------------------------- Script2.sh #!/bin/bash sh script1.sh //simply calling script1.sh ------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies

5. Shell Programming and Scripting

SHELL SCRIPT Function Calling Another Function Please Help...

This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord but only one record is getting wrote in DB.... Please advise ASAP...:confused: function InsertFtg { FTGSTR="" echo "Saurabh is GREAT $#" let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies

6. Programming

How to step in one function after the function be executed in gdb?

In gdb, I can call one function with command "call", but how can I step in the function? I don't want to restart the program, but the function had been executed, gdb will execute next statement, and I don't know how to recall the function. (4 Replies)
Discussion started by: 915086731
4 Replies

7. Homework & Coursework Questions

Shell script calling Perl function, sort and find data, write to new files

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I must write a shell script that calls two external Perl functions--one of which sorts the data in a file, and... (6 Replies)
Discussion started by: kowit010
6 Replies

8. Shell Programming and Scripting

Help to Modify File Name in each function before calling another function.

I have a script which does gunzip, zip and untar. Input to the script is file name and file directory (where file is located) I am reading the input parameters as follows: FILENAME=$1 FILEDIR=$2 I have created 3 functions that are as follows: 1) gunzip file 2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies

9. Shell Programming and Scripting

Need help on awk for printing the function name inside each function

Hi, I am having script which contains many functions. Need to print each function name at the starting of the function. Like below, functionname() { echo "functionname" commands.... } I've tried like below, func=`grep "()" scriptname | cut -d "(" -f1` for i in $func do nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies

10. Shell Programming and Scripting

Function - Make your function return an exit status

Hi All, Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition. #Body function1() { if then echo "exist" else echo "not exist" } #if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
xml2ag(1)							   User Commands							 xml2ag(1)

NAME
xml2ag - XML to AutoGen Definiton Converter SYNOPSIS
xml2ag [-flag [value]]... [--opt-name [[=| ]value]]...[<def-file>] This program will convert any arbitrary XML file into equivalent AutoGen definitions, and invoke AutoGen. DESCRIPTION
The template will be derived from either: * the --override-tpl command line option * a top level XML attribute named, "template" One or the other must be provided, or the program will exit with a failure message. The ``base-name'' for the output will similarly be either: * the --base-name command line option * the base name of the .xml file OPTIONS
-O file, --output=file Output file in lieu of AutoGen processing. By default, the output is handed to an AutoGen for processing. However, you may save the definitions to a file instead. -L dir, --templ-dirs=dir Template search directory list. This option may appear an unlimited number of times. Pass-through AutoGen argument -T tpl-file, --override-tpl=tpl-file Override template file. Pass-through AutoGen argument -l tpl-file, --lib-template=tpl-file Library template file. This option may appear an unlimited number of times. Pass-through AutoGen argument -b name, --base-name=name Base name for output file(s). Pass-through AutoGen argument --definitions=file Definitions input file. Pass-through AutoGen argument -S file, --load-scheme=file Scheme code file to load. Pass-through AutoGen argument -F file, --load-functions=file Load scheme function library. Pass-through AutoGen argument -s suffix, --skip-suffix=suffix Omit the file with this suffix. This option may appear an unlimited number of times. This option must not appear in combination with any of the following options: select-suffix. Pass-through AutoGen argument -o suffix, --select-suffix[=suffix] specify this output suffix. This option may appear an unlimited number of times. Pass-through AutoGen argument --source-time set mod times to latest source. Pass-through AutoGen argument -m, --no-fmemopen Do not use in-mem streams. Pass-through AutoGen argument --equate=char-list characters considered equivalent. Pass-through AutoGen argument --writable, --not-writable Allow output files to be writable. The not-writable form will disable the option. Pass-through AutoGen argument --loop-limit=lim Limit on increment loops. This option takes an integer number as its argument. The value of lim is constrained to being: exactly -1, or in the range 1 through 0x1000000 The default lim for this option is: 256 Pass-through AutoGen argument --shell=shell name or path name of shell to use. Pass-through AutoGen argument -t time-lim, --timeout=time-lim Time limit for server shell. This option takes an integer number as its argument. The value of time-lim is constrained to being: in the range 0 through 3600 Pass-through AutoGen argument --trace=level tracing level of detail. This option takes a keyword as its argument. The argument sets an enumeration value that can be tested by comparing them against the option value macro. The available keywords are: nothing debug-message server-shell templates block-macros expressions everything or their numeric equivalent. The default level for this option is: nothing Pass-through AutoGen argument --trace-out=file tracing output file or filter. Pass-through AutoGen argument --show-defs Show the definition tree. Pass-through AutoGen argument --used-defines Show the definitions used. Pass-through AutoGen argument -D value, --define=value name to add to definition list. This option may appear an unlimited number of times. Pass-through AutoGen argument -U name-pat, --undefine=name-pat definition list removal pattern. This option may appear an unlimited number of times. Pass-through AutoGen argument -M type, --make-dep[=type] emit make dependency file. This option may appear an unlimited number of times. Pass-through AutoGen argument -C, --core Leave a core dump on a failure exit. Many systems default to a zero sized core limit. If the system has the sys/resource.h header and if this option is supplied, then in the failure exit path, autogen will attempt to set the soft core limit to whatever the hard core limit is. If that does not work, then an administrator must raise the hard core size limit. -?, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager. -v [{v|c|n}], --version[={v|c|n}] Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. EXIT STATUS
One of the following exit values will be returned: 0 Successful program execution. 1 The command options were misconfigured. 2 An error was encountered processing the template. 3 The definitions could not be deciphered. 4 An error was encountered during the load phase. 5 Program exited due to catching a signal. If your template includes string formatting, a number argument to a "%s" formatting ele- ment will trigger a segmentation fault. Autogen will catch the seg fault signal and exit with code 5. AUTHORS
Bruce Korb COPYRIGHT
Copyright (C) 1992-2011 Bruce Korb all rights reserved. This program is released under the terms of the GNU General Public License, ver- sion 3 or later. BUGS
Please send bug reports to: autogen-users@lists.sourceforge.net NOTES
This manual page was AutoGen-erated from the xml2ag option definitions. GNU AutoGen (5.12) 10 Jul 2011 xml2ag(1)
All times are GMT -4. The time now is 07:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy