Search Results

Search: Posts Made By: vikram3r
8,530
Posted By vikram3r
This is what i get # printf...
This is what i get

# printf '%(%Y-%m-%d@%H:%M:%S %s\n)T' '12/28/17 0:40' '12/27/17 23:20'
(Y-%d@%M:%s
)T
#

vikram3r - please add codes tags to your code... all of it, anytime you post code. ...
8,530
Posted By vikram3r
ksh93 --version version sh (AT&T...
ksh93 --version
version sh (AT&T Research) 93t+ 2009-05-01

vikram3r - please add codes tags to your code... all of it, anytime you post code. Neo
8,530
Posted By vikram3r
Duration Calculation
OS = AIX oslevel:7.1
SHELL = KSH
8,530
Posted By vikram3r
Duration Calculation
I have 2 variables

startTime='122717 23:20'
endTime='122817 0:40'

how can i get the elapsed duration as like "1 hour 20 minutes" ?
Forum: Linux 04-02-2013
4,202
Posted By vikram3r
Linux equivalent package for "newform"
What is the rpm package details for the "newform" in solaris. ?

Solaris package description
"newform newform (1) - change the format of a text file"
/usr/bin/newform

If "newform"...
11,048
Posted By vikram3r
Limit process number in TOP command outupt
Linux top command prints more than 40 processes.

top -b -n 1 > Top_Output.txt

Is there a straight-forward option/way to limit only till the top 5 processes.

( Instead of using head, tail or...
2,452
Posted By vikram3r
Multiple Interval cron issue with order of execution
55,0 5,6 * * * myScript

This cron task will execute on 5:00AM, 5:55AM, 6:00AM and 6:55AM.

Is there any possibility to make it run only in the order specified
such as 5:55AM and 6:00AM...
3,022
Posted By vikram3r
ISQL connectivity validation in script
These are the things set within script
hostInfo=10.10.100.10:2000
serverName=myServer
dbName=myDB
userName=dbuser
passWord=dbPwd

I execute the mentioned isql snippet in dev server, and...
3,022
Posted By vikram3r
ISQL connectivity validation in script
1. Is there a way to validate ISQL connectivity in shell script(ksh) before executing any queries..?
2.what is the best way to handle NULL from ISQL restult assigned to a script variable ?(if ISQL...
12,622
Posted By vikram3r
Delete log file entries based on the Date/Timestamp within log file
Is there any other simpler ways(using grep, sed.,etc) to do the same in shell script ..?
12,622
Posted By vikram3r
Delete log file entries based on the Date/Timestamp within log file
If a log file is in the following format

28-Jul-10 ::: Log message
28-Jul-10 ::: Log message
29-Jul-10 ::: Log message
30-Jul-10 ::: Log message
31-Jul-10 ::: Log message
31-Jul-10 ::: Log...
13,942
Posted By vikram3r
Is there any option like , establishing isql...
Is there any option like ,
establishing isql connection only once, and executing multiple queries and getting their respective record counts in separate variables...?

My need is like,
isql >>...
13,942
Posted By vikram3r
How to assign record count of isql output to a shell variable ?
Actually with this option, the variable gets the value like '(1 row affected)' or '(0 rows affected)'. But i need only the exact record count. How to achieve this..?
13,942
Posted By vikram3r
How to assign record count output of isql to a shell variable ?
isql
select count(*) from Table
eof


How to assign record count output of isql query to a shell variable ?
4,064
Posted By vikram3r
Extract resultset numeric value from isql output ?
isql output comes as below,
(0 rows affected)
(1 row affected)
(7 rows affected)
How to extract the resultset number alone from the particular line ??

such as
0
1
7
Forum: Solaris 03-11-2010
32,712
Posted By vikram3r
Am using VIM - Vi IMproved version 6.3 on solaris...
Am using VIM - Vi IMproved version 6.3 on solaris SunOS 5.10


Did i answer your queries correctly ? If not kindly let me know the commands to check it.
Forum: Solaris 03-11-2010
32,712
Posted By vikram3r
VI Editor issue "E558: Terminal entry not found in terminfo"
When trying to open a document with VI editor, getting the following error..

E558: Terminal entry not found in terminfo
'vt100' not known. Available builtin terminals are:
builtin_gui
...
Forum: Solaris 12-21-2009
18,793
Posted By vikram3r
directory compare in two different servers
How can we get the directory tree along with the size in two different servers and find the difference between the list..??

Eg,

Server1
dirTree1 -size

Server 2
dirTree2 -size

how...
8,341
Posted By vikram3r
directory tree with directory size
find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/'

Can someone explain how this works..??
...
3,455
Posted By vikram3r
Selective input passing, for cron with multiple interval
0,0 4,5 11 11 * /pkgs/roots/scripts/job_monitor.ksh

i have the requirement like,
for the first time(4) the script should have the input parameter as "Value1"
but the second time(5) it should...
11,383
Posted By vikram3r
issue with isql output
Hi d_swapneel14 (https://www.unix.com/members/49218.html)

how did u resolve the issue?
7,064
Posted By vikram3r
Thanks, How can i find the absolute path of...
Thanks,

How can i find the absolute path of isql command. ?
what command will get the default absolute path of isql command.
7,064
Posted By vikram3r
isql output file not created while running it through cron
#!/bin/ksh
file="/pkgs/roots/scripts/ISQL_op.txt"
isql -H 11.11.11.111:1111 -U myUser -P myPwd -o $file << eof
go
select * from Table1
go
eof

my cron entry
00 08 03 11 *...
6,889
Posted By vikram3r
using cron to call a script from another script
Hi All,
Thanks a lot for all your help.

I tried to invoke Myscript from another script. And i put the calling script(call_Myscript.ksh) in the cron. But in the log(tempfile.txt) i jus get the...
6,889
Posted By vikram3r
i tried giving absolute path for redirection. But...
i tried giving absolute path for redirection. But it didn't work.

i also tried to giving the cron entry
21 11 30 * * /pkgs/roots/scripts/Myscript.ksh 2>&1 > /pkgs/roots/scripts/tempfile.txt
...
Showing results 1 to 25 of 28

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