Search Results

Search: Posts Made By: srattani
2,970
Posted By srattani
Thank you very much, guruprasadpr and...
Thank you very much, guruprasadpr and elixir_sinari.

I used the solution guruprasadpr provided and it worked like a charm! Can you please explain the sed command you have used as to what -n means...
2,970
Posted By srattani
Extract XML tag value from file
Hello,

Hope you are doing fine. I have an log file which looks like as follows:


Some junk text1
Date: Thu Mar 15 13:38:46 CDT 2012 DATA SENT SUCCESSFULL: [<?xml version="1.0"...
1,773
Posted By srattani
Hello vergesh99, Thanks for clarification, I...
Hello vergesh99,

Thanks for clarification, I now understand sr.awk means a separate source file.

I am trying to understand the code. So basically you look for the word "Currency" and you stop...
1,773
Posted By srattani
Hello vgersh99, Thanks for your reply. I...
Hello vgersh99,

Thanks for your reply. I would like to understand what the code is doing, what is sr.awk?

Is nawk line and code block together? Would appreciate explanation. Thanks
1,773
Posted By srattani
Help with File Data Extract
Hello,

Hope you are doing fine. I have been struggling with it for some time now and I would really appreciate your help.

Following is file format:


Currency,Name,Date, Term
USD, ...
1,101
Posted By srattani
Hi yazu, Thank you very much, I will give it...
Hi yazu,

Thank you very much, I will give it a try.

Question if the header #DATE, CODE, VALUE appears more than once in this file will it process those too?
1,101
Posted By srattani
Help nawk parse file
Hello,

Hope you are doing fine. I have a file in following format. I only want to process the data inside the section that comes after #DATE,CODE,VALUE


#ITEMS WITH CORRECTIONS
..........
1,841
Posted By srattani
Thank you very much, worked like a charm....
Thank you very much, worked like a charm. Appreciate all your patience and help.
1,841
Posted By srattani
Hi, I still dont exactly follow. Will it be...
Hi,

I still dont exactly follow. Will it be something like follows?


nawk '
FNR==1 {
numheadrecords = $1;
rowstoprocess = numheadrecords + 2;
next;
}
...
1,841
Posted By srattani
Hi, Thanks for your reply. In my case If you...
Hi,

Thanks for your reply. In my case If you see I do not have an END, so when would I know that nwak is done processing the rows and I should store RCount in a file.

I am assuming initially I...
1,841
Posted By srattani
Help nawk change external variable
Hello,

I have external variable rownumber, I am processing files within a loop and I would like to keep incrementing rownumber. What is happening is inside nawk section it passes rownumber but it...
2,626
Posted By srattani
Thanks Jean Pierre and Methyl, The awk...
Thanks Jean Pierre and Methyl,

The awk command you sent will only run for number of record in header correct? For the lines following the first line, it uses space as delimiter within the line to...
2,626
Posted By srattani
Hi Jean Pierre/Methyl, Jean Pierre, I see...
Hi Jean Pierre/Methyl,

Jean Pierre, I see that when you are using awk you are using printf, I want the data elements to be sent to a file and not printed, how do I make data elements to go to...
2,626
Posted By srattani
michaelrozar17, I did put double square braces...
michaelrozar17, I did put double square braces and I get a syntax error, what is this for? you want to know which shell it is ?

Thanks Jean-Pierre, I will try it out and let you know.
...
2,626
Posted By srattani
Hi methyl, Thanks for look at my post I...
Hi methyl,

Thanks for look at my post I really appreciate it, I am new to Unix scripting so def. need guidance. Please see my answers

What Operating System and version are you running? It is...
2,626
Posted By srattani
Help with File Slow Processing
Hello,

Hope you are doing fine. Let me describe the problem, I have a script that calls another script K2Test.sh, this script K2Test.sh (created by another team) takes date as argument and...
940
Posted By srattani
Hello, Thanks, but I do not follow. Date...
Hello,

Thanks, but I do not follow. Date calc script? First I guess some how I need to get the date out from the file name isnt it? I am not quite sure how and then some how compare that date...
940
Posted By srattani
Help File Copy Historical Files
Hello,

I have a directory /files/storage in which I have files having file name in format as follows

sabclin.yyyymmdd.0 e.g. sabclin.20110621.0 etc.

I want to copy all files that have a date...
1,477
Posted By srattani
Hi Ahamed If I understand correctly you...
Hi Ahamed

If I understand correctly you loop through the files and use sed replace to replace CRDT with crdt_lon on each file before it is actually copied correct?

I will give it a try and...
1,477
Posted By srattani
Help with copy command
Hello,

I have a directory in which I have files as follows

CRDT.csv
CRDT.csv.1
CRDT.csv.2
....
CRDT.csv.n

I would like to copy it over to another directory as

crdt_lon.csv...
2,242
Posted By srattani
Hi Franklin and ctsgnb, I modified the...
Hi Franklin and ctsgnb,

I modified the version Franklin send and made some changes and modified it to
sed 's/\([0-9]\{6\} CH/\1.CH/g' data.txt


And it worked, thanks.

Thanks to everyone...
2,242
Posted By srattani
Hi ctsgnb, Thank you so much it worked, m I...
Hi ctsgnb,

Thank you so much it worked, m I reading it correctly that you ares suggesting to replace space CH with dot CH, correct?

Thanks

---------- Post updated at 01:15 PM ----------...
2,242
Posted By srattani
I tried it, the out put is unchanged, please...
I tried it, the out put is unchanged, please advise, I would really appreciate it
2,242
Posted By srattani
Help with sed replace
Hello,

I have a comman separated file lets day data.txt in following format
,:000002 CH XIN9I.INDX, 34.7534909645,:000002 CH,:Index XIN9I.INDX
,:000063 CH XIN9I.INDX, 6.3062924781,:000063...
Showing results 1 to 24 of 24

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