Hi Unix Champs,
I want to awk on a fixed length file.
Instead if the file was a delimited file, then I could have used -F and then could have easily done manipulation on the fields.
How do i do the same in case of fixed length file?
Thanks in Advance.
Regards. (7 Replies)
Hi,
I need to find a file with name xyz.mno.1234235.msg
Here the numbers can be anything and is not fixed. But the first 6 characters are fixed ie, xyz and mno are fixed and wont change. Actually this file comes to this directory every week with only the number part changing.
How is it... (7 Replies)
Hi,
I have the following variable declaration which looks like a 3d array or N matrixs KxK of floats
float (*table);
I have to pass to a function only the first table.
How can I do it??
Thanks (6 Replies)
Hi All,
I just need to do find and replace in a file....
say for eg I have the input file like below:
in.txt
#####
oldtextoldtext
oldtext
oldtext
oldtext
oldtext123
oldtext-
oldtext
I need to replace oldtext to newtext... my output file should come like below..
out.txt... (9 Replies)
Can someone please help?I have a file - fixed.txt----------------------------AABBBBCCCCCCDDDEEFFFFGGGGGGHHHIIJJJJKKKKKKLLL----------------------------To insert delimiters at fixed lengths of 2, 4, 6, 3, I created a file text1.txt as-------------------2463----------------------and trying to execute... (10 Replies)
i have the following lines
T2345
T3435 - bugfixed and running
T5654 fixed and committed
T34541:- fixed and committed
i need to extract only the T part (eg:T2345) ,ie i dont want any special characters after it.
i have been trying with grep and egrep but with no luck.
pls help (11 Replies)
Dear members..
I have a fixed width file. Requirement is as below:-
1. Scan each record from this fixed width file
2. Check for value under field no "6" equals to "ABC". If yes, then filter this record into the output file
Please suggest a unix command to achieve this, my guess awk might... (6 Replies)
I have got a text file- each line of 200 characters length. The file is too large in size. It could be 100 MB. The lines begin with any of 0,1,2,3,4,5. I want to replace from 121-131 characters with spaces irrespective of wehatever it is there (the exisitng charatcers could be spaces). And this I... (6 Replies)
Hi
I have a data with varying length i need to convert it to data of fixed length 1000 by appending blank spaces. This has to be done only for specific records i tried with awk but it not happening.
Pls suggest me some advices
awk '/^500/ {$0=sprintf("%s%t" w-length "s", $0,x)}1'... (12 Replies)
Hello
I've question on the requirement I am working on.
We are getting a fixed length file with "33" characters long. We are processing that file loading into DB.
Now some times we are getting a file with "35" characters long. In this case I have to remove two characters (in 22,23... (14 Replies)
Hei buddies,
Need ur help once again.
I have a file which has bunch of lines which starts from a fixed pattern and ends with another fixed pattern.
I want to make use of these fixed starting and ending patterns to select the bunch, one at a time.
The input file is as follows.
Hi welcome... (12 Replies)
Thank u so much .Its working fine as expected.
---------- Post updated at 03:41 PM ---------- Previous update was at 01:46 PM ----------
I need one more help.
I have another file(fixed length) that will get negative value (ex:-00000000003000) in postion (98 - 112) then i have to... (6 Replies)
Hello All, I'm able to achieve my goal of creating a fixed width file from a comma delimited but I know I'm not doing it as efficiently as possible.
Original File
checksab
004429876883,O,342040,981.98,10232014
004429876883,O,322389,2615.00,10232014... (6 Replies)
Hi All,
I need to convert a fixed length file to a delimited file with , (comma). But not all columns, some of the columns in the fixed files are used as fillers and I do not need that in the output file.
test_fixed_len.txt
I 0515 MR 394
I 0618 MR & MRS 942
I 0618 MR & MRS... (7 Replies)
This exercise has taught me a lot about POSIX, dash and their limits.
I decided to experiment with fixed point arithmetic using dash as the shell.
If you want to test it then change the shebang to your directory where 'dash' is or use 'bash' instead.
This was one of the hardest things I have... (21 Replies)