07-05-2005
Thanks vgersh99,
It works well, however, I left out an important piece of information, that is I don't know for sure how many sets of records there are in the file. How would I handle that?
Thanks again.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do I loop through the lines of a file?
Each line of the file will be the name of a server.
Like:
server1.stuff.com
server2.stuff.com
For each server I want to do a secure copy of the file to the other server.
This will be a cron job so I guess it needs to run in just SH. I... (3 Replies)
Discussion started by: jimmy
3 Replies
2. Shell Programming and Scripting
Below is part of a script i have written to loop through part of a port info file. How do i continue the script to get info for OS Device Name, manufacturer and then put information into an array?
HBA Port WWN: 10000000c9420b4b
OS Device Name: /dev/cfg/c10
Manufacturer: Emulex... (5 Replies)
Discussion started by: rcon1
5 Replies
3. Shell Programming and Scripting
NEWBIE ALERT!
Hi,
I'm 1 month into learning Perl and done reading "Minimal Perl" by Tim Maher (which I enjoyed enoumously). I'm not a programmer by profession but want to use Perl to automate various tasks at my job. I have a problem (obviously) and are looking for your much appreciated help.... (0 Replies)
Discussion started by: jospan
0 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
Following is the program that i have written in cygwin. The redirection of the unfound $param1 to error.txt file doesnt work.Can any one help?
#!/usr/bin/sh
fname=$1
sed 's/ //g' "$fname" > fname1
while read i
do
echo $i > file1
#param1 is script name
... (1 Reply)
Discussion started by: janardhanamk
1 Replies
5. Shell Programming and Scripting
I need to create an xml using shell script, but i first want to know how can i write multiple lines to file using shell script? (7 Replies)
Discussion started by: vel4ever
7 Replies
6. UNIX for Dummies Questions & Answers
Hi Dears,
I use the below code to analyze lines in a file:
for line in `cat ucsv`
do
echo $line
//analyze statements
donehowever, if line contains space char, it will be broken. for example, if file content is:
#login,full name,email,project,role,action
gmwen,Bruce... (3 Replies)
Discussion started by: crest.boy
3 Replies
7. UNIX for Dummies Questions & Answers
Hello, I have a comma seperated data sheet with multiple fields of biological data. One column contains the ID name of the sample, where there could be more than one sample separated by a comma. I would like a script that reads this field, and for each sample ID, copies the entire line and writes... (18 Replies)
Discussion started by: torchij
18 Replies
8. UNIX for Dummies Questions & Answers
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
Discussion started by: @man
7 Replies
9. Shell Programming and Scripting
Good Afternoon,
I start with a file named biglist.txt.
I have another file smallerlist. txt
I want to remove the lines from smallerlist.txt from biglist.txt and leave those lines that do not reside in smallerlist.txt.
Thanks !! (2 Replies)
Discussion started by: popeye
2 Replies
10. Shell Programming and Scripting
I've tried numerous commands, but I am not sure how to use sed in a loop. This is what I have:
VARZ contains CARD_FILE_LIST and it also contains CARD_FILE_LIST2
so
echo "$VARZ"
CARD_FILE_LIST
CARD_FILE_LIST2
I have a file with 60 lines in /tmp/testfile it and I want those lines deleted... (3 Replies)
Discussion started by: newbie2010
3 Replies
LEARN ABOUT HPUX
xmdirection
XmDirection(library call) XmDirection(library call)
NAME
XmDirection -- Data type for the direction of widget components
SYNOPSIS
#include <Xm/Xm.h>
DESCRIPTION
XmDirection is the data type specifying the direction in which the system displays subwidgets, children of widgets, or other visual compo-
nents that are to be laid out. This data type also affects traversal order within tab groups.
XmDirection is implemented as an unsigned char bit mask. The horizontal and vertical directions can be specified independent of each
other. XmDirection also specifies the precedence of the horizontal and vertical directions relative to each other. For example, a value of
XmRIGHT_TO_LEFT_TOP_TO_BOTTOM lays out a component horizontally from right to left first, then vertically top to bottom.
XmDirection provides the following masks, each of which corresponds to a particular bit in XmDirection:
o XmRIGHT_TO_LEFT_MASK
o XmLEFT_TO_RIGHT_MASK
o XmTOP_TO_BOTTOM_MASK
o XmBOTTOM_TO_TOP_MASK
o XmPRECEDENCE_HORIZ_MASK
o XmPRECEDENCE_VERT_MASK
In addition to the preceding single bit masks, XmDirection also provides the following multiple bit masks. These multiple bit masks are
particularly useful as arguments to XmDirectionMatchPartial:
o XmHORIZONTAL_MASK
o XmPRECEDENCE_MASK
o XmVERTICAL_MASK
Motif also provides the following enumerated constants for specifying various combinations of directions:
XmRIGHT_TO_LEFT_TOP_TO_BOTTOM
Specifies that the components are laid out from right to left first, then top to bottom.
XmLEFT_TO_RIGHT_TOP_TO_BOTTOM
Specifies that the components are laid out from left to right first, then top to bottom.
XmRIGHT_TO_LEFT_BOTTOM_TO_TOP
Specifies that the components are laid out from right to left first, then bottom to top.
XmLEFT_TO_RIGHT_BOTTOM_TO_TOP
Specifies that the components are laid out from left to right first, then bottom to top.
XmTOP_TO_BOTTOM_RIGHT_TO_LEFT
Specifies that the components are laid out from top to bottom first, then right to left.
XmTOP_TO_BOTTOM_LEFT_TO_RIGHT
Specifies that the components are laid out from top to bottom first, then left to right.
XmBOTTOM_TO_TOP_RIGHT_TO_LEFT
Specifies that the components are laid out from bottom to top first, then right to left.
XmBOTTOM_TO_TOP_LEFT_TO_RIGHT
Specifies that the components are laid out from bottom to top first, then left to right.
XmTOP_TO_BOTTOM
Specifies that the components are laid out from top to bottom. If horizontal direction is important, do not use this constant.
XmBOTTOM_TO_TOP
Specifies that the components are laid out from bottom to top. If horizontal direction is important, do not use this constant.
XmDEFAULT_DIRECTION
Specifies that the components are laid out according to the default direction. (This constant is primarily for widget writers.)
XmLEFT_TO_RIGHT
Specifies that the components are laid out from left to right. If vertical direction is important, do not use this constant.
XmRIGHT_TO_LEFT
Specifies that the components are laid out from right to left. If vertical direction is important, do not use this constant.
RELATED
XmDirectionMatch(3), XmDirectionMatchPartial(3), XmDirectionToStringDirection(3), XmString(3), XmStringDirection(3), and XmStringDirection-
ToDirection(3).
XmDirection(library call)