Sponsored Content
Operating Systems Linux Parse ; deliminated variable to create variables Post 302732317 by scottish_jason on Saturday 17th of November 2012 06:27:11 AM
Old 11-17-2012
what if i want to do this from a variable holding that information rather than a file
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

convert file deliminated by colon to one deliminated by tab characters

I know this seems simple to some of you so could you help? example> file:Mine and yours :daily need this deliminated to tab characters (2 Replies)
Discussion started by: yammer
2 Replies

2. Shell Programming and Scripting

How can I parse a record found in /etc/passwd into variables?

I am working with the Oracle 10.2.0.3 job scheduler on Solaris 10, and unfortunately, the scheduler executes scripts in such a way that several default shell environment variables are not defined. For example, $HOME, $USER, and $LOGNAME are missing. How can I parse the appropriate record in... (7 Replies)
Discussion started by: shew01
7 Replies

3. Shell Programming and Scripting

How to: Parse text string into variables using Korn shell

I am writing a script to keep check on free disk space, and I would like to find a way to parse $LINE (see code below) into a numeric value (for free disk space percentage) and a string value (for mount point). If possible, I would like to avoid sed or any additional use of awk since I am not very... (7 Replies)
Discussion started by: shew01
7 Replies

4. Shell Programming and Scripting

How to parse a string into variables

I'm working in korn shell and have a variable which contains a string like: aa_yyyymmdd_bbb_ccc_ddd.abc. I want to treat the _ and . as delimiters and parse the string so I end up with 6 values in variables that I can manipulate. My original plan was to use var1=`echo $sting1 | cut -c1-c2` but... (9 Replies)
Discussion started by: aquimby
9 Replies

5. Shell Programming and Scripting

Want to parse output for variables in Bash

Trying to finish up my script that automates some video encoding work. Situation: There is an MKV file to be transcoded. Problem: MKVINFO will give a bunch of output about an MKV file, included in that output are two lines I am interested in: | + Default duration: 41.708ms (23.976 fps... (9 Replies)
Discussion started by: randyharris
9 Replies

6. Shell Programming and Scripting

Parse config file and store the values in variables

Hi, I have a config file that has blank, commented lines. I need to escape commented lines, blank lines, parse the remaining lines and store them in variables or array. the config file contains the following lines. # config file # Define Oracle User ORA_USER=abcde ORA_PASS=xyzabc... (8 Replies)
Discussion started by: Lakshmi Chowdam
8 Replies

7. UNIX for Dummies Questions & Answers

Parse or cut concat variables to individual values

Hello I need to pass some environment parameters to a datastage job and am getting an error when trying to send the complete concatinated variable. I have decided to parse out just the values and send as parameters but am struggling to find the best way to do this (actually I am not very... (3 Replies)
Discussion started by: LynnC
3 Replies

8. Shell Programming and Scripting

Parse variables from C++ to shell

Hi All, #include <iostream> int main() { std::int foo = 34; system("mkdir /home/linuxUser/fooDir"); system("vi fooFile") system("write foo in fooFile") foo = 43; foo = read foo from fooFile; std::cout << "foo = " << foo ; } result should be foo = 34 can... (3 Replies)
Discussion started by: linuxUser_
3 Replies

9. Shell Programming and Scripting

awk to create variables to pass into a bash loop to create a download link

I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies

10. UNIX for Beginners Questions & Answers

Grepping for one variable while using awk to parse an associated variable

Im trying to search for a single variable in the first field and from that output use awk to extract out the lines that contain a value less than a value stored in another variable. Both the variables are associated with each other. Any guidance is appreciated. File that contains the... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
doctools::toc::export::nroff(n) 				Documentation tools				   doctools::toc::export::nroff(n)

__________________________________________________________________________________________________________________________________________________

NAME
doctools::toc::export::nroff - nroff export plugin SYNOPSIS
package require Tcl 8.4 package require doctools::toc::export::nroff ?0.2? package require doctools::text package require doctools::nroff::man_macros export serial configuration _________________________________________________________________ DESCRIPTION
This package implements the doctools table of contents export plugin for the generation of nroff markup. This is an internal package of doctools, for use by the higher level management packages handling tables of contents, especially doc- tools::toc::export, the export manager. Using it from a regular interpreter is possible, however only with contortions, and is not recommended. The proper way to use this func- tionality is through the package doctools::toc::export and the export manager objects it provides. API
The API provided by this package satisfies the specification of the doctoc export plugin API version 2. export serial configuration This command takes the canonical serialization of a table of contents, as specified in section ToC serialization format, and con- tained in serial, the configuration, a dictionary, and generates nroff markup encoding the table. The created string is then returned as the result of the command. CONFIGURATION
The nroff export plugin recognizes the following configuration variables and changes its behaviour as they specify. string user This standard configuration variable contains the name of the user running the process which invoked the export plugin. The plugin puts this information into the provenance comment at the beginning of the generated document. string file This standard configuration variable contains the name of the file the table of contents came from. This variable may not be set or contain the empty string. The plugin puts this information, if defined, i.e. set and not the empty string, into the provenance com- ment at the beginning of the generated document. boolean inline If this flag is set (default) the plugin will place the definitions of the man macro set directly into the output. If this flag is not set, the plugin will place a reference to the definitions of the man macro set into the output, but not the macro definitions themselves. Note that this plugin ignores the standard configuration variables format, and map, and their values. TOC SERIALIZATION FORMAT
Here we specify the format used by the doctools v2 packages to serialize tables of contents as immutable values for transport, comparison, etc. We distinguish between regular and canonical serializations. While a table of contents may have more than one regular serialization only exactly one of them will be canonical. regular serialization [1] The serialization of any table of contents is a nested Tcl dictionary. [2] This dictionary holds a single key, doctools::toc, and its value. This value holds the contents of the table of contents. [3] The contents of the table of contents are a Tcl dictionary holding the title of the table of contents, a label, and its ele- ments. The relevant keys and their values are title The value is a string containing the title of the table of contents. label The value is a string containing a label for the table of contents. items The value is a Tcl list holding the elements of the table, in the order they are to be shown. Each element is a Tcl list holding the type of the item, and its description, in this order. An alternative descrip- tion would be that it is a Tcl dictionary holding a single key, the item type, mapped to the item description. The two legal item types and their descriptions are reference This item describes a single entry in the table of contents, referencing a single document. To this end its value is a Tcl dictionary containing an id for the referenced document, a label, and a longer textual descrip- tion which can be associated with the entry. The relevant keys and their values are id The value is a string containing the id of the document associated with the entry. label The value is a string containing a label for this entry. This string also identifies the entry, and no two entries (references and divisions) in the containing list are allowed to have the same label. desc The value is a string containing a longer description for this entry. division This item describes a group of entries in the table of contents, inducing a hierarchy of entries. To this end its value is a Tcl dictionary containing a label for the group, an optional id to a document for the whole group, and the list of entries in the group. The relevant keys and their values are id The value is a string containing the id of the document associated with the whole group. This key is optional. label The value is a string containing a label for the group. This string also identifies the entry, and no two entries (references and divisions) in the containing list are allowed to have the same label. items The value is a Tcl list holding the elements of the group, in the order they are to be shown. This list has the same structure as the value for the keyword items used to describe the whole table of contents, see above. This closes the recusrive definition of the structure, with divisions holding the same type of elements as the whole table of contents, including other divisions. canonical serialization The canonical serialization of a table of contents has the format as specified in the previous item, and then additionally satisfies the constraints below, which make it unique among all the possible serializations of this table of contents. [1] The keys found in all the nested Tcl dictionaries are sorted in ascending dictionary order, as generated by Tcl's builtin command lsort -increasing -dict. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
doctools, export, nroff, serialization, table of contents, toc CATEGORY
Text formatter plugin COPYRIGHT
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools2toc 0.2 doctools::toc::export::nroff(n)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy