Search Results

Search: Posts Made By: Kunalcurious
1,896
Posted By Kunalcurious
Restarting shell script in case of a failure
I have a shell script which sqoops data from one place to hive and it does in 2 groups list. If one group is completed it waits for the second to get completed then goto to orc load, but it it fails...
2,702
Posted By Kunalcurious
Strange, when i run the following command: awk...
Strange, when i run the following command:
awk -F, -v yr='"YEAR"' ' { $0=$0 OFS (NR == 1 ? yr : "20" substr($0,length($0)-2,3)) } 1 ' OFS="," testk3.csv > testk5.csv


it shows me output as...
2,702
Posted By Kunalcurious
These are some lines from the file: ...
These are some lines from the file:


"PERIOD_END_DATE" "PERIOD_END_DATE"
"17-FEB-19" "17-FEB-19"
"24-FEB-19" "24-FEB-19"
"24-FEB-19" "24-FEB-19"
2,702
Posted By Kunalcurious
@anbu23 for some reason it acts funny. the...
@anbu23 for some reason it acts funny. the command I used is:

awk -F, -v yr='"YEAR"' ' { $0=$0 OFS (NR == 1 ? yr : "20" substr($0,length($0)-2,3)) } 1 ' OFS="," testk3.csv > test5.csv

and the...
2,702
Posted By Kunalcurious
will this year replacement will replace any year,...
will this year replacement will replace any year, say the data might have 2018, 2019, 2015, 2016, so all it gotta do is extract 18, 19 and add 20 in front so the value becomes...
2,702
Posted By Kunalcurious
awk script to extract a column, replace one of the header and replace year(from ddmmyy to yyyy)
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance...
Showing results 1 to 6 of 6

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