Search Results

Search: Posts Made By: ernesto
1,524
Posted By ernesto
Hi RudiC, Thanks for the reply. i just...
Hi RudiC,

Thanks for the reply. i just wanted to know how the code works.
1,524
Posted By ernesto
after long hours. Finally got the code to work...
after long hours. Finally got the code to work for this.


echo "insert into table_name (col1,col2,col3,col4,col5,DATE1,DATE2,col6,col7,col8,col9,col10,col11) values...
1,524
Posted By ernesto
hi, no, this is not a homework. i am trying...
hi,

no, this is not a homework. i am trying to create an automation tool where the inputs are from an sql file.

code is a per below.



echo "insert into table_name...
1,524
Posted By ernesto
How to get value from a close and open parenthesis?
Hi Gurus,

I have an input like the one below. What i wanted to achieved is to create a select statement based from that information

INPUTInsert into table_name...
1,393
Posted By ernesto
How to call variable inside a function globally?
Hi Gurus,

Is there a way to call a variable inside a function anywhere within the script?

Thanks.

BR,
Ernesto
1,244
Posted By ernesto
Just my thoughts. you need to remove "$" sign...
Just my thoughts. you need to remove "$" sign from the variable name"OUTPUT". and for best practice you need to enclose your variables with curly brackets "{}" .



OUTPUT=$(sqlplus -s...
963
Posted By ernesto
How to make spaces in between?
Hi Guru's,

i have a problem and hope you could help me on how to go about it. I have a file which is impossible to decipher. Please see below.

INPUT
121014259981568JBAUT30JaniceBautistaMANGER...
3,600
Posted By ernesto
Hi RudiC, The script is now working. i...
Hi RudiC,

The script is now working. i forgot to place "-" on the script itself.

Thanks.
3,600
Posted By ernesto
Hi RudiC, None, i have commented the awk...
Hi RudiC,

None, i have commented the awk part on the script. Please see details below.

SCIPT

[dev:Desktop]$ cat test.sh
#!/bin/sh
read FD <test1.txt
FS=$(date -d "${FD% *}" +%s)

seq...
3,600
Posted By ernesto
Hi RudiC, thanks for the info. but this is...
Hi RudiC,

thanks for the info. but this is what i am getting, it replaces all those in third column with 0.

2016-01-13 01:33 0
2016-01-13 01:32 0
2016-01-13 01:31 0
2016-01-13 01:30 0...
3,600
Posted By ernesto
yes, but i'm still getting the same error. Please...
yes, but i'm still getting the same error. Please see debug mode details below:


+ for DT in '{0..7200..60}'
+ printf '%(%F %H:%M)T 0\n' 1452611280
test.sh: line 7: printf: `(': invalid format...
3,600
Posted By ernesto
Hi, Here is the bash version ...
Hi,

Here is the bash version


[dev:~]$ echo $BASH_VERSION
4.1.2(1)-release
3,600
Posted By ernesto
Hi, I am getting error. bash:...
Hi,

I am getting error.


bash: printf: `(': invalid format character
bash: printf: `(': invalid format character
bash: printf: `(': invalid format character
bash: printf: `(': invalid...
3,600
Posted By ernesto
Hi Rudic, Yes, have tried this one awk...
Hi Rudic,

Yes, have tried this one

awk '{split($1,N,":"); while (++L < N[1]) printf "%02d:00\t0 <--\n", L; L=N[1]} 1'


but it is not what i am looking for.

OUTPUT

[dev:~]$ awk...
3,600
Posted By ernesto
How to add missing date and time in a bash script?
Hi Again,

I have a file that contains date and time for the past 2 hours. What i need is add missing date and time in a file.

INPUT

2016-01-13 01:33 10
2016-01-13 01:31 10
2016-01-13...
1,206
Posted By ernesto
Want to add those that have the same minute in a file
Hi All,

Need your help on how i can sum up the values. I have a file that contains the count and the time. I wanted to add up all the first column having the same datestamp. Please see below.
...
938
Posted By ernesto
Hi Sir, it's not. We are getting stats based...
Hi Sir,

it's not. We are getting stats based on a table which has 00:00:00 to 23:59:00 logging. and i am getting the total for an hour.

Hope you could help me.

Cheers,

---------- Post...
938
Posted By ernesto
Replace missing row with 0
Hi all,

i have a file which contains something as below:

INPUT

00:00 0
01:00 0
02:00 0
03:00 0
04:00 0
05:00 0
06:00 0
07:00 0
08:00 0
09:00 0
10:00 5
11:00 ...
Showing results 1 to 18 of 18

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