Search Results

Search: Posts Made By: Ajay Venkatesan
8,865
Posted By Ajay Venkatesan
Thanks Don, it worked fine... :)
Thanks Don, it worked fine... :)
8,865
Posted By Ajay Venkatesan
Insert field values in a record using awk command
Hi Friends,

Below is my input file with "|" (pipe) as filed delimiter:
My Input File:
HDR|F1|F2||||F6|F7

I want to inser values in the record for field 4 and field 5.
Expected output...
1,870
Posted By Ajay Venkatesan
Thanks For the reply Frank, it is still not...
Thanks For the reply Frank, it is still not working It is writing the second file as it is in the out put file. It is not appending the data in the record.

Can l you please let me know why are you...
1,870
Posted By Ajay Venkatesan
Compare two files and write data to second file using awk
Hi Guys,

I wanted to compare a delimited file and positional file, for a particular key files and if it matches then append the positional file with some data.

Example:

Delimited File...
3,147
Posted By Ajay Venkatesan
Writing the output of set -x into Log files
Hi Guys,

I am using set -x in my script to track the flow of the script.

But if i want to write the output of the set -x into a log file, how do i do it?

Thanks,
Ajay
6,729
Posted By Ajay Venkatesan
Thanks ton Rajamadhavan :) :) It worked. And...
Thanks ton Rajamadhavan :) :)

It worked. And we are also able to change the suffix also:
sed -n /^$a/p file | split -l 2 -d - test

And my output is test00, test01 and so on.

Thanks again...
6,729
Posted By Ajay Venkatesan
Hi Rajamadhavan, This works cool. Just few...
Hi Rajamadhavan,

This works cool. Just few confirmation required.

I guess the ^ is escape character, Am i right?
Secondly, the split command is creating the files with names xaa,xab and so on....
6,729
Posted By Ajay Venkatesan
Hi Raja,adhvan, This work. But when there is...
Hi Raja,adhvan,

This work. But when there is no Header and trailor in the file. Then this will strip off the first record which acuallly would have been the detail.

Instead i tried someting...
6,729
Posted By Ajay Venkatesan
Ok. I will have Header, Detail and Trailor...
Ok. I will have Header, Detail and Trailor records, of which Detail will looping (infinite) and Heasder/Trailor will not loop and they might of migth not occur in the inuput (In other workd they are...
6,729
Posted By Ajay Venkatesan
Hi Vidyadhar, Thanks for the reply, this...
Hi Vidyadhar,

Thanks for the reply, this works but when I do not have the header or trailor record in the input file, even then it strips the first and the last line. I wanted to split the files...
6,729
Posted By Ajay Venkatesan
Split file based on records
I have to split a file based on number of lines and the below command works fine:

split -l 2 Inputfile -d OutputfileMy input file contains header, detail and trailor info as below:
H
D
D
D
D...
991
Posted By Ajay Venkatesan
Thanks a lot Yoda.. It worked.... :)
Thanks a lot Yoda.. It worked.... :)
991
Posted By Ajay Venkatesan
Required Command in awk command
Hi Firends,

I wanted to extract the first record of the file which starst with character say "X". And I tried an awk command which works when i try to execute it individually:

awk...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 05:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy