Search Results

Search: Posts Made By: sagar.cumar
2,773
Posted By sagar.cumar
Hi Scrutinizer, Below is series of commands...
Hi Scrutinizer,

Below is series of commands I am executing in a shell script:
echo "HEADER|$nfnam" > $nfnam
cat Input.DAT >> $nfnam
echo "TRAILER|$fcnt" >> $nfnam

I am getting as below:...
2,773
Posted By sagar.cumar
Hi Scrutinizer, I am using below sequence...
Hi Scrutinizer,

I am using below sequence of commands and I am getting only one record in the ouput file:

echo "HEADER|$nfnam" > $nfnam
cat Input.DAT >> $nfnam
echo "TRAILER|$fcnt" >>...
2,773
Posted By sagar.cumar
Hi Scrutinizer, I am getting only one...
Hi Scrutinizer,

I am getting only one record even though the input file has more than one record.

Sagar.
2,773
Posted By sagar.cumar
Hi Scrutinizer, yes, rowcount should be...
Hi Scrutinizer,

yes, rowcount should be replaced by rcnt and newfilename should be replaced by nfnam in my above script.

Hi user8,

Thanks a lot for quick response. But, I tried to run...
2,773
Posted By sagar.cumar
Cat writing only one record in the output file
Hi All,

I have an input file containing data as below:

Input.DAT
XXXXXXX|YYYYYYY|ZZZZZZZZZZ|12334446456|B|YY|111111111|111111111|111111111|111111111|15|3|NNNNNN|Y|3|AAA|111111111...
3,949
Posted By sagar.cumar
Hi Bipin, Thanks for the explanation and it...
Hi Bipin,

Thanks for the explanation and it is clear now.

I have included below 2 lines in my KSH script as first 2 lines:
#!/usr/bin/ksh
#!/usr/bin/awk -f

I try to execute awk in the...
3,949
Posted By sagar.cumar
Hi All, Do we need to include anything in...
Hi All,

Do we need to include anything in shell script if we use awk as it is not working in shell script.

Sagar
3,949
Posted By sagar.cumar
Hi Bipin, Thanks a lot for your solution....
Hi Bipin,

Thanks a lot for your solution. But, May I know what is wrong in my command.

Can I get any link to get explanation of awk command.

Sagar.
3,949
Posted By sagar.cumar
Hi Jim, Apologies and below is expected...
Hi Jim,

Apologies and below is expected output. The input file should be splitted based on the column 5 and accordingly it should create output files.

Please find below output scripts....
3,949
Posted By sagar.cumar
Hi Jim, No luck...:mad: But the same...
Hi Jim,

No luck...:mad:

But the same command is working on text file.

Sagar
3,949
Posted By sagar.cumar
awk command on .DAT file not working?
Hi All,

I am trying to run awk command on .DAT file and it is not working. The same command is working on .txt file:
Contents of the file ZZ_55555555_444444_ZZZZZZ_7777777_888_99.DAT:
...
4,124
Posted By sagar.cumar
Hi vgersh99, I have test regarding the...
Hi vgersh99,

I have test regarding the performance by taking 9.9 GB file with a split of 9 files. Its excellent, you made my day.

Could you please advise on below:
1. eliminating header and...
4,124
Posted By sagar.cumar
Hi vgersh99, Below is the expectation from...
Hi vgersh99,

Below is the expectation from the source system:
"Code Type" is the distinguishing field in the input file from source.
We are going to receive 9 different Code Types from the...
4,124
Posted By sagar.cumar
Hi vgersh99, Thanks a lot for your quick...
Hi vgersh99,

Thanks a lot for your quick reply. I shall further test and come back if I see any issues.

Regards,
Sagar.

---------- Post updated at 07:48 PM ---------- Previous update was...
4,124
Posted By sagar.cumar
Hi vgersh99, Thanks for your quick reply....
Hi vgersh99,

Thanks for your quick reply. But, I am getting only one record in each output file.

Could you please advise further to get all records in the output file.

Regards,
pavan
4,124
Posted By sagar.cumar
Hi All, To make things clear, below is my...
Hi All,
To make things clear, below is my actual requirement. Sorry for giving more details lately.
Could you please help me in getting this quickly.

Thanks a lot in advance.

Requirement...
4,124
Posted By sagar.cumar
Hi bmk, Any examples please for split...
Hi bmk,

Any examples please for split command.

Hi Vikram,

Thanks for the link and it is very much useful. But, the said variables at field level.

Regards,
Sagar.
4,124
Posted By sagar.cumar
Hi Pravin, Thanks for quick response. What...
Hi Pravin,

Thanks for quick response. What is NR in awk command. Could you please bit more clear on the command.

Also, is there any performance issue as daily we are going to get 5GB of data....
4,124
Posted By sagar.cumar
Splitting the file using awk
Hi,

I have a requirement in which I am going to receive one file and should be splitted to 9 different files based on one distinguisher called TYPE.

I heard that this can be done using awk or...
Showing results 1 to 19 of 19

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