arranging datas if input file is not having also...!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting arranging datas if input file is not having also...!!
# 1  
Old 06-03-2009
arranging datas if input file is not having also...!!

hi,

my input file is containg uid, eriMaster ,eriResign, ericontry, dept.
some of the uid are not having all info.

out put should include all info irrespctive of datas of input file
if any one data is missing, then it has to print Null or zero..then continue with the existing one.

here is the code
=========


while(<FILE>) {
my $WORD = $_;
chop $WORD;
if($WORD=~/^uid=/){
printf FILE1 "\n". $WORD." " ;
}else {

if($WORD=~/^ou=/){
printf FILE1 " ".$WORD." ";
}
if($WORD=~/^eriMaster=/){
printf FILE1 " ".$WORD." ";
}else{
printf FILE1 " ".$WORD." "
}
elsif($WORD=~/^eriResign=/){
printf FILE1 " ".$WORD." ";
}
}
}

==========


thanks in advance..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting/Arranging file based on tags using awk

Hi, I have file which contains data based on tags. Output of the file should be in order of tags. Below are the files : Tags.txt f12 f13 f23 f45 f56 Original data is like this : Data.txt 2017/01/04|09:07:00:021|R|XYZ|38|9|1234|f12=CAT|f23=APPLE|f45=PENCIL|f13=CAR... (5 Replies)
Discussion started by: Prathmesh
5 Replies

2. Shell Programming and Scripting

How to create a file contains millions of lines and each line has different datas?

I want to create a file contains millions of lines. The line format like this: acnum$$123456$$+$$Tom$$111$$ fields separated by $$, field 1 and field 3 have only two options:acnum or crenum; + or -. field 4 can be any name or any letters. Other fields can be any fixed length digits. So, I want to... (9 Replies)
Discussion started by: hhdzhu
9 Replies

3. Shell Programming and Scripting

Format column datas

I have some data like this: 4258092 TRXCODE a 19 CARDNBR a 10 PINFLAG a 6 FUISSUER a 12 PRODUCT a 24 STATE n 1 I want out put this format: <?xml version="1.0" encoding="GB2312"?> <convGrp> <grpid>4258092</grpid> <script> <!]> ... (4 Replies)
Discussion started by: hhdzhu
4 Replies

4. UNIX for Dummies Questions & Answers

Comparing datas in two excel file

Hi All, i have two excel sheets with same column name as below col1 col2 col3 ---- ---- ----- 1 121 156 24 456 788 45 444 777 765 32 77 col1 col2 col3 ---- ---- ----- 24 456 ... (1 Reply)
Discussion started by: arunmanas
1 Replies

5. Shell Programming and Scripting

Print separated datas

Hi People !! I need your help. I have a a txt file "example" with it datas. 11:35 10/12/2003 10.10.10.1 God.com 5 country Responsable of ASN 11:37 12/12/2003 10.10.10.1 FATHER.COM 5 country Responsable of ASN 11:40 14/12/2003 10.10.10.3 www.mother 6... (6 Replies)
Discussion started by: ras
6 Replies

6. Shell Programming and Scripting

Need script to take input from file, match on it in file 2 and input data

All, I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then Insert file1 column2 to file2 column4 then create a new file. File1: 12345 Sam 12346 Bob 12347 Bill File2:... (1 Reply)
Discussion started by: darkoth
1 Replies

7. Shell Programming and Scripting

Help with arranging data file

Dears, I have the below data, sss-aaaaaa 111211 222222 33333 22222 1163111 sss-vvvvvv 111311 224522 335633 24322 111511 sss-cccccc 111221 224522 333333 24322 111511 sss-dddddd 111211 222222 33333 22345222 113111 I want to make them like ... (7 Replies)
Discussion started by: yahyaaa
7 Replies

8. UNIX for Dummies Questions & Answers

re-arranging text in a file with AWK

Hi Gurus, I have a text file that I want to process with the following structure; 4528788 Blah - Something 9341423 Text - Somethinghere 98792223,5546761 Some - More - Text 5119503,5159504,1234567 Text - More - Text 13459695 Stuff - Text Again 13526583 Junk - More Text Here 13595177... (1 Reply)
Discussion started by: th3g0bl1n
1 Replies

9. Shell Programming and Scripting

Blank characters between Datas

Hello, I read a file whose in lines are datas and between thses datas there is blank characters (10, 12 or 5 or 1 .......) So when i use the command while read line in the script(see under) there is also only one character between the datas and the others blank characters are not here. ... (3 Replies)
Discussion started by: steiner
3 Replies

10. Shell Programming and Scripting

select datas from an input file

I have a file containing a list of references and I want to run a script that will make the same action for each reference. The input file changes every hour, it's why I want to use a script that can read in a file, record by record, and run a specific action for the reference readed. Thanks... (1 Reply)
Discussion started by: dde
1 Replies
Login or Register to Ask a Question
datas(3U)						    InterViews Reference Manual 						 datas(3U)

NAME
ColorData, GSData, MobilityData, MoveData, VoidData - Data subclasses for storing common undo information SYNOPSIS
#include <Unidraw/Commands/datas.h> DESCRIPTION
The Unidraw library predefines several Data subclasses for storing common undo information: ColorData stores two PSColors (usually repre- senting foreground and background colors), while GSData stores a complete set of graphics state in a FullGraphic object. MobilityData stores the mobility and graphics state information needed to undo a change in mobility. MoveData stores a horizontal and vertical distance. VoidData stores a void pointer as a useful alternative to deriving trivially from Data just to store one word of information. COLORDATA PUBLIC OPERATIONS
ColorData(PSColor*, PSColor*) Create a ColorData instance, supplying the PSColor objects it stores. GSDATA PUBLIC OPERATIONS
GSData(Graphic*) Create a GSData instance, supplying the Graphic object from which to copy a complete set of graphics state. The GSData constructor copies this information into its _gs member, from whence it can be retrieved later. MOBILITYDATA PUBLIC OPERATIONS
MobilityData(Mobility, Graphic*) Create a MobilityData instance, supplying the mobility and a Graphic object from which to copy a complete set of graphics state. The MobilityData constructor copies the graphic into its _gs member, from whence it can be retrieved later. MOVEDATA PUBLIC OPERATIONS
MoveData(float, float) Create a MoveData instance, supplying two floating point numbers that normally represent horizontal and vertical movement. VOIDDATA PUBLIC OPERATIONS
VoidData(void*) Create a VoidData instance, supplying a pointer to an object of unknown type. SEE ALSO
Data(3U), Graphic(3U), globals(3U) Unidraw 24 January 1991 datas(3U)