Search Results

Search: Posts Made By: ozzman
11,521
Posted By ozzman
reborg, thanks for the reply. But it's...
reborg,

thanks for the reply. But it's a bit hard for me to follow the code. Is it possible to give me a brief explaination?

thanks
11,521
Posted By ozzman
Forgot to mention that all the fields in each...
Forgot to mention that all the fields in each line separated by "|".
11,521
Posted By ozzman
input file format
The input file format will look like this:

00|AA|BB|CC|DD|
01|EE|FF|GG|
02|HH|KK|LL|
00|AA|BB|CC|DD|
01|...
02|...

And all I need to do is to validate if the number of fields for each line...
11,521
Posted By ozzman
Thanks for the reply
the part that take the most of the time is the following code.


function line_count
{
COUNT=`echo $1 | awk -F\| '{print NF}'`
if [ "$COUNT" != "$2" ]
then
...
11,521
Posted By ozzman
Don't have the script right here with me
matrixmadhan,

I don't have the script right here with me, but I can brief you how my script looks like.


#starts with couple of constants for the file
function1 ...
...
11,521
Posted By ozzman
shell script takes long time to complete
Hi all,

I wrote this shell script to validate filed numbers for input file. But it take forever to complete validation on a file. The average speed is like 9mins/MB.

Can anyone...
2,351
Posted By ozzman
2,351
Posted By ozzman
Get field value.
since the awk can't handle 100+ fields. what do I use to get one of the field value, say field 45. Currently I am using echo $1|awk -F\| '{print $45}' .

And I don't know why I can't get gawk...
2,351
Posted By ozzman
problem solved
Thanks Ygor, that solves the problem.
2,351
Posted By ozzman
get the NF of a string line
Hi all,

New here and new to shell as well.
Currently I have a problem when use echo $1 | awk -F\| '{print NF}' to get the NF of input string separated by "|". There's input contains...
Showing results 1 to 10 of 10

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