Search Results

Search: Posts Made By: 100bees
1,979
Posted By 100bees
Hi clx , You could say it is a string it is...
Hi clx ,
You could say it is a string it is not CSV file.

RudiC
Thanks i will try that , i forgot to add i am using korn shell.

Thanks
1,979
Posted By 100bees
How do i replace a word ending with "key" using awk excpet for one word?
echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} |
awk 'gsub(/^[grp_key,]|abc,|[key;]$/,"") {print}'


Required output

{grp_key,xyz,aaa,ccc}
1,516
Posted By 100bees
Replacing valuses containig space and special characters
**Extremely sorry for the typos in heading

Old:CAST ('${DEFAULT_HIGH_DATE}' AS DATE FORMAT 'YYYY-MM-DD')
New :CAST(CAST('${G_DEFAULT_HIGH_DATE}' AS DATE FORMAT 'MM-DD-YYYY') as DATE FORMAT...
1,402
Posted By 100bees
Hi i tried with find and it says `${filepath ...
Hi i tried with find and it says `${filepath
}' also is not expected.
1,402
Posted By 100bees
Search if file exists for a file pattern stored in array
Hi experts,

I have two arrays one has the file paths to be searched in , and the other has the files to be serached.For eg
searchfile.dat will have
abc303
xyz123

i have to search for...
8,162
Posted By 100bees
Thanks it works perfectly. :)
Thanks it works perfectly. :)
8,162
Posted By 100bees
Need to exclude certain file extensions while listing the file using ls
Hi friends,
I need to check for the latest file
say i have list of files like this


test_files
test_files.1
test_files.2
test_files.3.bin.Z


I do it this way


ls -lrt...
1,746
Posted By 100bees
How to copy a file with long records ,i.e spanning to 2 or 3 lines from UNIX to excel?
Hi Experts,
I have a Unix csv file which has long records ie the record length is more than 80 so it goes to the next line.So when its in unix though it spans to two or three lines it still counts...
3,018
Posted By 100bees
Hi Scrutinizer, Thanks a lot for helping me out...
Hi Scrutinizer,
Thanks a lot for helping me out understand lot of things here.

Actually the code is working now i had placed the delete a[i] after the second for loop earlier now i placed it...
3,018
Posted By 100bees
os -AIX oslevel - 6.1.0.0 If i delete the...
os -AIX
oslevel - 6.1.0.0

If i delete the empty line i get this


fruits,40,veg,42,
fruits,75,Grains,100,


I never realised an empty line could have this impact. Thank you, i am...
3,018
Posted By 100bees
@Scrutinizer Yes you are right i used print...
@Scrutinizer

Yes you are right i used print instead of printf

Now my output is like


fruits,40,veg,42,
fruits,75,Grains,100,
fruits,75,


but what i need is

fruits,40,veg,42...
3,018
Posted By 100bees
the output of cat -ev input is ...
the output of cat -ev input is

fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30$
fruits,pinapple,10,fruits,orange,5,fruits,apple,20,Grains,wheat,100$
$
3,018
Posted By 100bees
@bartus11 -Thank you, comma at the end is not a...
@bartus11 -Thank you, comma at the end is not a problem,but could you please explain me the code , and should it be delete a[i]

awk -F"," '{for (i=1;i<=NF;i+=3) a[$i]+=$(i+2);for (i in a) printf...
3,018
Posted By 100bees
yes thanks for the correction
yes thanks for the correction
3,018
Posted By 100bees
Find repeated word and take sum of the second field to it ,for all the repeated words in awk
Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on...
1,786
Posted By 100bees
Thanks that was really helpful :)
Thanks that was really helpful :)
1,786
Posted By 100bees
[Solved] Issue with using for loop as for in {2..6} in korn shell
Hi i have to cut columns 2 to 6 from a file and assign it to arrays ,
The following code works


for ctcol in 2 3 4 5 6;
do
set -A a$ctcol $(cut -d, -f $ctcol test_file)
done


how ever...
7,617
Posted By 100bees
Thank you all for your valuable inputs it helped...
Thank you all for your valuable inputs it helped me.
7,617
Posted By 100bees
How to print 1st field and last 2 fields together and the rest of the fields after it using awk?
Hi experts,

I need to print the first field first then last two fields should come next and then i need to print rest of the fields.

Input :

a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4...
4,574
Posted By 100bees
Thanks, using your approach , i could achieve the...
Thanks, using your approach , i could achieve the desired result.I have set flags for each condition and iterated it to next field.
4,574
Posted By 100bees
Match Pattern after certain pattern and Print words next to Pattern
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions...
Showing results 1 to 21 of 21

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