Search Results

Search: Posts Made By: garvit184
2,324
Posted By garvit184
@Scutinizer Thanks it works..
@Scutinizer Thanks it works..
2,324
Posted By garvit184
@RudiC if we have multiple matches then I need a...
@RudiC if we have multiple matches then I need a new line character before another P1 block is printed. The script doesn't takes care of it.
2,324
Posted By garvit184
Thanks Rudic. It works. Can you explain a little...
Thanks Rudic. It works. Can you explain a little about your awk line. Does it work block by block or line by line ?
Sorry for asking such a basic question but I am very new to awk.
2,324
Posted By garvit184
Awk: Comparing arguments with in line values of file and printing the result
I need to develop a script where I will take two date arguments as parameter date1 and date2 which will in format YYYYMM.

Below is the input file say sample.txt.

sample.txt will have certain...
3,328
Posted By garvit184
Sorry for late reply. Was very busy. This...
Sorry for late reply. Was very busy.

This solves my Problem. Thanks :D

Do you have idea about how can I write a multi-line regular expression ?

like say for example,

17,9:10/8013765024...
3,328
Posted By garvit184
@akshay How can I redirect value of say...
@akshay

How can I redirect value of say only one variable s1 into a file say s1.txt.

printf "'%d',",s1 >> s1.txt

But I am getting an error Illegal Statement.

I have used backticks but no...
3,328
Posted By garvit184
@aia: I agree with you. Actually I am working on...
@aia: I agree with you. Actually I am working on something and the part I needed help is just this reporting part. My whole project is mostly in basic shell and AWK is like a black area for me.
...
3,328
Posted By garvit184
[QUOTE=Akshay Hegde;302905096]awk -F'/' ' ...
[QUOTE=Akshay Hegde;302905096]awk -F'/' '

# Function to validate number
function isnum(x){return(x==x+0)}

/P1/,/P2/{
# Found start increment i reset variables go to next...
3,328
Posted By garvit184
Actually, its my mistake I wasn't clear. My...
Actually, its my mistake I wasn't clear. My example quoted not correct.
Here is the correct input.

P1
10,9:11/18013013582
,10:1
,167:0
,487:5/E.164
11,9:15/310410532169026
,10:60
,167:0...
3,328
Posted By garvit184
@Akshay, please see my previous post. Its...
@Akshay, please see my previous post.

Its almost close to what I want, only I think you have not include the condition to print "NULL" in case it doesn't find specified value.
3,328
Posted By garvit184
Hello Akshay, Thanks for quick response. ...
Hello Akshay,

Thanks for quick response.
Your awk works fine but there are some tweaks that need to be done in order to fit my scenario.

First of all, you awk is reading line by line and...
3,328
Posted By garvit184
Get values block by block in same file
I have a file say "SAMPLE.txt" with following content,

P1
10,9:6/123456
P2
blah blah
P1
10,9:5/98765
P2
blah
blah
P1
blah blah
P2

I...
Showing results 1 to 12 of 12

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