Search Results

Search: Posts Made By: gksenthilkumar
1,185
Posted By gksenthilkumar
Thank you for quick support, it is working fine...
Thank you for quick support, it is working fine after giving:

awk -F, 'FNR==NR{a[$1];next}; ($1 in a)' f1 f2
output
f1,1,2,3,4,5
f1,2,4,6,8,10
Please use CODE tags when displaying sample...
1,185
Posted By gksenthilkumar
Compare 2 files and extract the data which is present in other file - awk is not working
file2 content
f1file2 content
f1,1,2,3,4,5
f1,2,4,6,8,10
f10,1,2,3,4,5
f10,2,4,6,8,10
f5,1,2,3,4,5
f5,2,4,6,8,10awk 'FNR==NR{a[$1];next}; !($1 in a)' file2 file1output
f10,1,2,3,4,5...
1,762
Posted By gksenthilkumar
Multiple CSV to XLSX with multiple tab
I am using KSH, share some sample code to merge multiple CSV files (each CSV has different number of columns) in same Directory into single XLSX with multiple tab/sheet - each CSV goes to each...
4,900
Posted By gksenthilkumar
How to convert mmm-yy to mm/dd/yyyy format in UNIX ?
How to convert mmm-yy to mm/dd/yyyy format in unix ?

example:

Jan-99 to 01/01/1999
Jan-00 to 01/01/2000
Jan-25 to 01/01/2025

Dec-99 to 01/12/1999
Dec-00 to 01/12/2000
Dec-25 to...
2,271
Posted By gksenthilkumar
SHELL SCRIPT ------------- #!/bin/sh awk...
SHELL SCRIPT
-------------

#!/bin/sh
awk -F'\t' '
BEGIN { printf "SELECT ROW_KEY_COL,\nCASE\n" }
{sub("[ \r]+$","")}
$8 ~ "[ZN]" {
if($8=="Z") {
RL[$1]=$7
if ($7 !=...
2,271
Posted By gksenthilkumar
WOW!!!!!!!!!! This is awesome code, I was...
WOW!!!!!!!!!!
This is awesome code, I was writing this code connecting with database to do with 500+ lines & still I am working on how to handle All Other (if RULE contains 'All Other' then i need...
2,271
Posted By gksenthilkumar
How to create SQL statement out of data using shell script?
Table TAB1 contains following example data (its a tree sitting in table data format & its driven based CHILD & PARENT column pick the RULE condition to generate the below SQL:
...
1,367
Posted By gksenthilkumar
tried below & not producing expected.. any help?,...
tried below & not producing expected.. any help?, thanks


the core part is below half..



#!/bin/ksh
#set -x
#ksh shell_to_sql.ksh -d db1 -f 2015094 -o tera1 -l use_act -r run -i...
1,367
Posted By gksenthilkumar
we have written in Teradata programming language...
we have written in Teradata programming language to generate this sql, now plan to put in Unix, so don’t know how to do, if we have some sample for this help to enhance further
1,367
Posted By gksenthilkumar
Shell to SQL for data
Input:

Table: TAB1
CHILD PARENT SS MID MNM VNM RULE FLG
1 ? S1 ? ? V1 rule004 I
2 1 S1 ? ? V1 0 Z
3 1 S1 ? ? V1 1 Z
4 2 S1 ? ? V2 rule001 N ...
2,249
Posted By gksenthilkumar
The issue has re-solved using, checkfile=`eval...
The issue has re-solved using,
checkfile=`eval echo $filename` instead of currently using checkfile=$filename

this eval statement looking & changing the directory that $one & $two with file and...
2,249
Posted By gksenthilkumar
Sorry here Outfile -> logfile
Sorry here Outfile -> logfile
2,249
Posted By gksenthilkumar
Check file exist issue
I have created two scripts, one with hardcoded and another one with extract from file instead of hardcoded,

script:1
--------
#!/bin/ksh
filename="$one/file1.dat"
if [ -f $filename ]
then...
12,718
Posted By gksenthilkumar
I have created two scripts, one with hardcoded...
I have created two scripts, one with hardcoded and another one with extract from file instead of hardcoded,

script:1
--------
#!/bin/ksh
filename="$one/file1.dat"
if [ -f $filename ]
then...
12,718
Posted By gksenthilkumar
below is my detailed issue about the query...
below is my detailed issue about the query...
12,718
Posted By gksenthilkumar
Check if file exist
Hi

Does anybody know how I can check if a file exists

i.e. see bellow, this doesn't work by the way and if tried countless variations on this

file1=$one/file111.txt
if [ -f $file1 ]
then ...
2,808
Posted By gksenthilkumar
Convert to time format
I Have variable $currenttime and I want to display this variable as a TIME FORMAT and the $currenttime value contains like
000000
120000
020000

I want to display to
00:00:00
12:00:00...
4,540
Posted By gksenthilkumar
I have tried using (cat $msg; uuencode...
I have tried using
(cat $msg; uuencode $attach1 in1.txt ; uuencode $attach2 in2.txt ) | mailx -m -r "subject" mail_addr@domain.com
and its working fine now...

Thanks!
4,540
Posted By gksenthilkumar
Issue on sending a mail with attachment using unix script ?
Issue on sending a mail with attachment using unix script ?

Below is my code and is working fine and there is a issue in the attachment, the attachment file printing as a text-encripted message in...
9,094
Posted By gksenthilkumar
whats command for search including sub directory ?
What is the command for search the program name from the entire directory (all directories in the unix box, means including sub directories...)
2,165
Posted By gksenthilkumar
Doubt in SED command
PLEASE EXPLANIN ME...
sed 's~\(.*\)\(<name>\)\(.*\)\(</name>\)\(.*\)~\2\3\4~'

this is the format
<start><name>123<\name><addr>BAC<\addr><loc>sfo<\loc></start>
Showing results 1 to 21 of 21

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