Search Results

Search: Posts Made By: Vivekit82
3,786
Posted By Vivekit82
Load a file from UNIX into database
Hi,

I want your help to see if there is a way wherein we can load a set of files which are lying in unix server into my database using sql loader.
Also the person who will be running sql loader...
4,594
Posted By Vivekit82
Question on UNIX
Hi,
Can you please advise on answers of below 4 questions as I am not sure on the answers.
1.
You are porting a C program that interacts over a network with remote systems. The program was...
4,902
Posted By Vivekit82
Answers for few objective questions.
Hi Unix geniuses,

I need your help for the answers of few objective Q&A.
i dont know if my answers are correct or not.
So i really need your help to provide the answers which will help me in...
1,319
Posted By Vivekit82
Copying and renaming files
hi,


source directory as /home/home01
target directort as /home/home02

I have below files in source directory:

FrontOf_history.dat
FrontOf_history1.dat

In target directory have many...
1,616
Posted By Vivekit82
Find and rename part of a file
hi,
Need your help.
I need to write a script for below..
i have two files in directory /home/abc as below:

Watch_20140203_abc.dat
Watchnow_20140203_abc.dat

I have to copy this file from
...
1,433
Posted By Vivekit82
UNIX script to interchange column values
Hi,

I have the below script which is fetching the data from a file as below:

awk -F "~" 'NR>1 {print $5}' 1.txt
The o/p is like:

1452350
1458638
1452350
2
5696837


No i want to...
16,212
Posted By Vivekit82
i want to search the file in this way only as...
i want to search the file in this way only as sometimetimes the file name is
Account_20090213_abc.dat and sometimes Account_20090213_bcd.dat and various other combinations..
so how can i do...
16,212
Posted By Vivekit82
Check if file exists or not
Hi,

I want to check if the file exists or not in the directory.
i am trying below code but not working.


File="/home/va59657/Account_20090213*.dat"
echo "$File"
if [[ -e "$File" ]]; then...
3,011
Posted By Vivekit82
Send multiple HTML output in one mail
HI,

I have two scripts which is sending the mail in html format.


Script 1:

1.IFILE=/home/home01/Report.csv
if [ -r $IFILE ] #Checks if file exists and readable
then
if awk -F, '{ T...
2,765
Posted By Vivekit82
I tried below but not working: } '...
I tried below but not working:


} ' ${IFILE} >> $OFILE1

But still output not coming and something loke below is getting printed:


<TR><TD>* * * * * End Of Report * * * *...
2,765
Posted By Vivekit82
all the echo statements are getting printed...
all the echo statements are getting printed correctly.
I triied sendmail -t option in script 2 but still the output is same.
below code is not getting executed corrcetly in 2nd script:
Not sure if...
2,765
Posted By Vivekit82
Can you pls guide what excactly should be written...
Can you pls guide what excactly should be written and how?
Also how come script 1 is working perfectly fine and output not coming in Script 2.
2,765
Posted By Vivekit82
Html output in correct format
Hi,

I am running two scripts as below.
In Script 1 i am getting correct output in proper HTML format while in script 2 i am not getting output in mail and only html code is getting printed.I...
1,275
Posted By Vivekit82
Thanks.i am using this code as I have only one...
Thanks.i am using this code as I have only one row in the file..
The other code was perfectly working for all the cases.
But I want HTML output only but through email sent by output.sh.
When I am...
1,275
Posted By Vivekit82
Calling one script inside another
Hi,

I am calling a script log.sh from output.sh.
Log.sh has below pice of code:


IFILE=/home/home1/Report1.csv
if awk -F, '$6==0 && $7==0{exit 1}' ${IFILE}
then
awk -F, '
BEGIN{...
7,384
Posted By Vivekit82
Hi, gawk not working. Sample: ...
Hi,

gawk not working.
Sample:



Case 1:Mail should come
Report
,,,,,,,Report generating
Column 1,column 2,column 3,column 4,column 5,column 6,column 7
1,2,3,4,5,0.00,0.00...
7,384
Posted By Vivekit82
No..initially column has 0 value.Now if i want to...
No..initially column has 0 value.Now if i want to check 0.00 then this logic doesnt seem to working with decimal values.
Please guide.
7,384
Posted By Vivekit82
Sorry i didnt see your reply and edited my last...
Sorry i didnt see your reply and edited my last post.
I want to check now 0.00 both in cloumns.
Please guide.
7,384
Posted By Vivekit82
Thanks a lot..It worked.... last question..if...
Thanks a lot..It worked....
last question..if instead of 0 column value is either 0 or 0.00 then what should be the logic.
Please guide.
7,384
Posted By Vivekit82
This is what it is writing when i am running in...
This is what it is writing when i am running in debug mode.
In this case both cloumns 6 and 7are 0 in all the rows.


+ awk -F, '{ T += $6 + $7 } END { exit(!T) }' /home/home01/file.csv
+...
7,384
Posted By Vivekit82
Actual data is somwething like below: ...
Actual data is somwething like below:


Case 1:Mail should come
Report
,,,,,,,Report generating
Column 1,column 2,column 3,column 4,column 5,column 6,column 7
1,2,3,4,5,0,0
1,3,5,6,7,1,1...
7,384
Posted By Vivekit82
i tried the code suggested by Corona,case 1 is...
i tried the code suggested by Corona,case 1 is success but in others also i am not getting the mail.

Case 1
0,0
0,0
0,0

No mail..success


Case 2:
0,0
0,1
0,0

No...
7,384
Posted By Vivekit82
Thnaks..I tried the soln proposed by Corona and...
Thnaks..I tried the soln proposed by Corona and Franklin but still i am getting the mail if column 6 and cloumn 7 both are 0 in file.
I want that if in any row of the file (either or both) of cloumn...
7,384
Posted By Vivekit82
Yes..no email should be sent and entire program...
Yes..no email should be sent and entire program should be skipped if both columns have 0 in all the lines.
7,384
Posted By Vivekit82
Still the mail is coming...It seems that the...
Still the mail is coming...It seems that the problem is not with this condion but in opening and closing of if statement and location of sendmail -t in html code.Please guide me.

...
Showing results 1 to 25 of 65

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