04-11-2006
I fail to see the point of changing my script to one that is uglier, more limited and leaves temp files behind.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a flat file with ~ as de-limiter (e.g: aaa~ba a~caa~0~d~e)
What I want is check if the 4th character is 0 and replace it with say 4. So now it becomes : aaa~ba a~caa~4~d~e.
I have to do this for the whole file, but the delimiter position remains the same, not the... (10 Replies)
Discussion started by: akdwivedi
10 Replies
2. Shell Programming and Scripting
I need a script for...
how to find a position of column data and print some string in the next line and same position
position should find based on *HEADER8* in text
for ex: ord123 abs 123 987HEADER89 test234
ord124 abc 124 987HEADER88 test235
... (1 Reply)
Discussion started by: naveenkcl
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am a newbie in unix programming so maybe this is a simple question.
I would like to know how can I make a script that outputs only the values that are not between any given start and end positions
Example
file1:
2 30
40 80
82 100
file2:
ID1 1
ID2 35
ID3 80
ID4 81
ID6... (9 Replies)
Discussion started by: fadista
9 Replies
4. Shell Programming and Scripting
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
Discussion started by: gpaulose
1 Replies
5. Shell Programming and Scripting
I'm trying to write a small shell script/command to insert the contents of one file into another file at a position marked with a given text string. It's not necessarily at the top or bottom of the file so I can't just use cat to cat the files together.
I think probably sed with the r option is... (5 Replies)
Discussion started by: shaun29
5 Replies
6. Shell Programming and Scripting
how to find character positionin file?
i.e
string = "123X568"
i want to find the position of character "X".
Thanks (6 Replies)
Discussion started by: LiorAmitai
6 Replies
7. Shell Programming and Scripting
I have a file called "INPUT" which takes the following format
MNT-BANK-NUMBERO:006,00:N
MNT-100-ACCOUNT-NUMBERO:018,00:N
MNT-1000-DESCRIPTIONO:045:C
.
.
.
Now i got to find the displacements of the account numbers of each field of a file.
For the field MNT-BANK-NUMBERO:006,00:N, the... (4 Replies)
Discussion started by: bobby1015
4 Replies
8. UNIX for Dummies Questions & Answers
Hi.
I need to write a script that will allow me to copy data from one position in a line to another position while changing the first 2 bytes of the data to a constant. Here is an example of a line of data before and what it needs to look like after. there are about 200 lines in the file.
... (1 Reply)
Discussion started by: wlb_shore_user
1 Replies
9. Shell Programming and Scripting
I have below scenario where i am getting a flat file but with some bad data
incoming data format
id|name|ind|crncy
123|xxx|y|usd
234|yy|n|
456|a|y90.5|vvv|gbp ----bad dataneed to cleanse the bad data above by adding a pipe '|' after 3rd column 'ind' if pipe '|' is not already there
... (1 Reply)
Discussion started by: rakesh5300
1 Replies
10. Shell Programming and Scripting
Hi everyone..
I have a list of values in a file...
a,
b,
c,
1,
2,
3,
aaaa,
bbbbb,
I am interested in converting this column to a row..
"text",aaaa,
bbbb
a,1 (7 Replies)
Discussion started by: manihi
7 Replies
LEARN ABOUT DEBIAN
blt_treecreatenode
Blt_TreeCreateNode(3) BLT Library Procedures Blt_TreeCreateNode(3)
__________________________________________________________________________________________________________________________________________________
NAME
Blt_TreeCreateNode - Creates a node in a tree data object.
SYNOPSIS
#include <bltTree.h>
Blt_TreeNode
Blt_TreeCreateNode(tree, parent, name, position)
ARGUMENTS
Blt_Tree tree (in) Tree containing the parent node.
Blt_TreeNode parent (in) Node in which to insert the new child.
const char *name (in) Node label. If NULL, a label will automatically be generated.
int position (in) Position in the parent's list of children to insert the new node.
_________________________________________________________________
DESCRIPTION
This procedure creates a new node is a tree data object. The node is initially empty, but data values can be added with Blt_TreeSetValue.
Each node has a serial number that identifies it within the tree. No two nodes in the same tree will ever have the same ID. You can find
a node's ID with Blt_TreeNodeId.
The arguments are as follows:
tree The tree containing the parent node.
parent Node in which the new child will be inserted.
name Label of the new node. If name is NULL, a label in the form "node0", "node1", etc. will automatically be generated. Name can be
any string. Labels are non-unique. A parent can contain two nodes with the same label. Nodes can be relabeled using Blt_TreeRe-
labelNode.
position Position the parent's list of children to insert the new node. For example, if position is 0, then the new node is prepended to
the beginning of the list. If position is -1, then the node is appended onto the end of the parent's list.
RETURNS
The new node returned is of type Blt_TreeNode. It's a token that can be used with other routines to add/delete data values or children
nodes.
EXAMPLE
The following example creates a new node from the root node.
Blt_Tree token;
Blt_TreeNode root, node;
if (Blt_TreeGetToken(interp, "myTree", &token) != TCL_OK) {
return TCL_ERROR;
}
root = Blt_TreeRootNode(token);
node = Blt_TreeCreateNode(token, root, "myNode", -1);
NOTIFICATIONS
Blt_TreeCreateNode can trigger tree notify events. You can be notified whenever a node is created by using the Blt_TreeCreateNotifyHan-
dler. A callback routine is registered that will be automatically invoked whenever a new node is added via Blt_TreeCreateNode to the tree.
KEYWORDS
tree, token
BLT
2.4 Blt_TreeCreateNode(3)