Search Results

Search: Posts Made By: Prachi Gupta
2,378
Posted By Prachi Gupta
Thanx for the help
Thanx for the help
2,378
Posted By Prachi Gupta
Suppress Error Message
How can I suppress a error message being given by awk command in bash shell?
27,069
Posted By Prachi Gupta
Thank you for the valuable input and showing...
Thank you for the valuable input and showing patience.

Do we have replace function in unix? Since I want to replace the commas in an array to blank spaces so that the output file can be a csv.
27,069
Posted By Prachi Gupta
Thanks It's working fine. But had few...
Thanks It's working fine.

But had few queries regarding the changes
What is the else part for?

else
{
f[$9]=f[$9]+1;
y=substr($9,1)"::"substr(f[$9],1);
a[y]=$1;...
27,069
Posted By Prachi Gupta
Yes this is correct. Did you make any...
Yes this is correct.

Did you make any changes in the code?
27,069
Posted By Prachi Gupta
0000003 in...
0000003 in "F7852A81-1BE0-42D6-83E1-8DAADF816CEC-0000003"
is just an extra data attached. We need not focus on this. We just have to consider first 36 characters. Whatever they may be
27,069
Posted By Prachi Gupta
These are few lines from the file 2012-05-09...
These are few lines from the file
2012-05-09 10:28:47.981 | SYNC | 00041 | DEBUG | Customer_Receive Payment | Task | Task started on a component |...
27,069
Posted By Prachi Gupta
The code works fine when I run it on small chunks...
The code works fine when I run it on small chunks of the file
but when running the complete file it gives different output.

Do you have any idea of this type of behavior?

Thanx for your help
27,069
Posted By Prachi Gupta
Thanks for the valuable input. But i have few...
Thanks for the valuable input.
But i have few queries...
I tried running it again but its not giving output for few set of lines which are part of a complete big file.

and also the condition for...
27,069
Posted By Prachi Gupta
Thanks for your valuable input.It helped a lot. ...
Thanks for your valuable input.It helped a lot.

But it is not working with few of the lines in the file.
as
2012-05-09 10:34:15.281 | SYNC | 00041 | DEBUG | EUO_Header Enrichment | Task ...
27,069
Posted By Prachi Gupta
The expected output is jms:Send to Remit Splits...
The expected output is
jms:Send to Remit Splits B678C56D-96DA-4FFC-B40E-9A032A2EB12E 400
--this 400 is result of((10:29:30.246)-(10:29:29.846))

filesystem:Reports_5 ...
27,069
Posted By Prachi Gupta
I am facing another issue I have a file: ...
I am facing another issue
I have a file:
2012-05-09 10:29:29.846 | SYNC | 00041 | DEBUG | Customer_Receive Payment | Task | Task started on a component |...
27,069
Posted By Prachi Gupta
if I have to check more than one word like "Task...
if I have to check more than one word like "Task started" or "Exchange started"
so will this code work??
awk -v var4="$var2" -v var5="$var3" -F\| '{gsub(" ","",$7)} ($7=="Taskstarted" ||...
27,069
Posted By Prachi Gupta
this is the sample input 2012-05-09...
this is the sample input

2012-05-09 10:28:47.942 | SYNC | 00040 | INFO | Customer_Receive Payment | Task | Task started |...
27,069
Posted By Prachi Gupta
Its not working.It's not giving any output...
Its not working.It's not giving any output neither any error
27,069
Posted By Prachi Gupta
I was trying the same thing with awk as I studied...
I was trying the same thing with awk as I studied about it somewhere but was facing some issues so posted here

---------- Post updated at 02:58 AM ---------- Previous update was at 01:18 AM...
27,069
Posted By Prachi Gupta
I tried the command awk -v var4=$var2 -v...
I tried the command
awk -v var4=$var2 -v var5=$var3 -F\| '$7~/Task started/ && $8~var4 && $9~var5 {print $0}' file.txt >> file1.txt


$var3 has value
xengine:CERR to ECR CF


it displays...
27,069
Posted By Prachi Gupta
Thanks for the help if i don't know the value...
Thanks for the help
if i don't know the value of var1 then will this command work?
awk -v var1 -F\| '$7~/Task started/ && $9~var3 {print $0}' input.txt >> file1.txt
27,069
Posted By Prachi Gupta
Hi itkamaraj. I didn't get you command. Can you...
Hi itkamaraj.
I didn't get you command. Can you please explain it? and I don't know what all are the values in variable since I am fetching values from array

awk -v var1="TEST" -F\| '$7~/Task...
27,069
Posted By Prachi Gupta
Thanks balajesuri the first command worked for...
Thanks balajesuri the first command worked for me.

If i have to add more than one condition then what is the syntax?
I need to match values stored in my variables(var1,var2) along with this Task...
27,069
Posted By Prachi Gupta
AWK Command
I have a file seperated by pipe(|) operator
I want to fetch lines from the file having the word "Task started" in 7th column
awk -F"[|]" '{if($7 == "Task started") print $0}' file.txt

But this...
15,718
Posted By Prachi Gupta
The file remittance.txt has proper values but...
The file remittance.txt has proper values
but where as the file outlatest1.txt has the message
[CODE]Unable to initialize device PRN[/CODE
15,718
Posted By Prachi Gupta
It will create outlatest1.txt with the desired...
It will create outlatest1.txt with the desired output

No idea where the PRN error went.Beacuse when I tried running it the error message changed
15,718
Posted By Prachi Gupta
Tried running the script again. Now the error...
Tried running the script again.
Now the error message being shown is
awk: fatal : cannot open the file outlatest1.txt
for reading (No such file or directory)


the complete script i have...
15,718
Posted By Prachi Gupta
I tried running the script but it is giving error...
I tried running the script but it is giving error
Unable to initialize device PRN
What does this mean??
Showing results 1 to 25 of 46

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