Search Results

Search: Posts Made By: gpaulose
2,003
Posted By gpaulose
Perl file comparison
Hi,
I'm a newbie in perl scripting. I want to compare first 18 characters of two files using perl and write output if they matches.

FileA;

835100000000000020000000001000000.000000000.000...
4,882
Posted By gpaulose
Two variables in a for loop
Can we assign two variables in a for loop?

I have an input file:

000301|20100502
835101|20100502


I want to read this file in a for loop and assign values to two different variables.
I...
1,686
Posted By gpaulose
Filter record from a file
Reposting since I didnt not get any reply.

I have a problem while filtering records from a file. Can somebody help please?

For eg: Consider the below files
Record file:
...
2,774
Posted By gpaulose
I found a probelm with this. Can somebody help...
I found a probelm with this. Can somebody help please?

When the match is done, if the filter records position is less than the record files position this will not work.

For eg: Consider the...
2,774
Posted By gpaulose
This worked. Thanks to all of you who helped me :)
This worked. Thanks to all of you who helped me :)
2,774
Posted By gpaulose
Thanks guys :-) ---------- Post updated at...
Thanks guys :-)

---------- Post updated at 12:08 PM ---------- Previous update was at 12:06 PM ----------

How about if I had to check for 2 columns in the Record file and I have two values in...
2,774
Posted By gpaulose
filter record from a file reading another file
Hi,
I want to filter record from a file if the records in the second column matches the data in another file. I tried the below awk command but it filters the records in the filter file. I want the...
7,928
Posted By gpaulose
Filter records in a file using AWK
I want to filter records in one of my file using AWK command (or anyother command). I am using the below code

awk -F@ '$1=="0003"&&"$2==20100402" print {$0}' $INPUT > $OUTPUT


I want to pass...
3,743
Posted By gpaulose
Could you explain the perl code please?
Could you explain the perl code please?
3,743
Posted By gpaulose
Remove duplicates from a file
Hi,

I need to remove duplicates from a file. The file will be like this

0003 10101 20100120 abcdefghi
0003 10101 20100121 abcdefghi
0003 10101 20100122 abcdefghi
0003 10102 20100120...
7,856
Posted By gpaulose
datetime.pm
Hi,

I'm trying to use datetime.pm function in Perl. I do not have in the library. Is there a way to get it and put it into library?

Thanks,
George.
4,532
Posted By gpaulose
This worked. Thanks a lot.
This worked. Thanks a lot.
4,532
Posted By gpaulose
Would you mind explaining the script? why...
Would you mind explaining the script? why fb[$2]=$3 instead of $2?? I didnt actually get that part.
4,532
Posted By gpaulose
compare two files using awk
Hi,

I want to compare two files using awk and write an output based on if the records matched.

Both the files are space delimitted.

File A:
8351 00000000000636 2009044 -00001.000
8351...
3,127
Posted By gpaulose
Thanks guys. It worked :)
Thanks guys. It worked :)
3,127
Posted By gpaulose
insert leading zeroes based on the character count
Hi,

I need add leading zeroes to a field in a file based on the character count. The field can be of 1 character to 6 character length. I need to make the field 14bytes.

eg:
8351,20,1...
4,677
Posted By gpaulose
Character limitation in Join command
Hi,
I'm trying to compare and join two files using join command. One of my files length is 3000. Join is not working for this file. It truncates character after 1600 lines. Anyone know a solution...
16,157
Posted By gpaulose
Insert character in a specific position of a file
Hi,

I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!


awk...
3,411
Posted By gpaulose
Got an error message not recognized flag i ...
Got an error message not recognized flag i


sed: Not a recognized flag: i
Usage: sed [-n] Script [File ...]
sed [-n] [-e Script] ... [-f Script_file] ... [File ...]



What...
3,411
Posted By gpaulose
skmdu, yes. You got it right. So are you asking...
skmdu, yes. You got it right. So are you asking me to do it in two sed commands?
3,411
Posted By gpaulose
cut and paste
Hi,
Need a help with shell script. I have to search for a string in one of the file, if match found, copy the line to a new file and delete the line from the exisiting file.
eg:...
2,822
Posted By gpaulose
remove first line from a file and put into another file
I want to remove first line from a file containing 10K + records and want to put that into a new file.

Tried sed '1d' filename>newfile
This is writing all the records into new file.

Can...
1,535
Posted By gpaulose
This worked.. Thank you:)
This worked.. Thank you:)
4,478
Posted By gpaulose
Increase sed performance
I'm using sed to do find and replace. But since the file is huge and i have more than 1000 files to be searched, the script is taking a lot of time. Can somebody help me with a better sed command....
1,535
Posted By gpaulose
Question in grep
I have a requirement where I need to search for 26 consecutive 000000.000 in a file. I tried using grep but it is not working.

The string I need to search is ...
Showing results 1 to 25 of 26

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