02-09-2015
Hello shaho87,
Could you please go through following thread I have given a solution for getting
date 1 day ago for NON GNU, kindly take it as a start up and then try frm your end and if you feel any problems please do let us know, we ca assist you.
Date variable - 1 in UNIX
Thanks,
R. Singh
Last edited by RavinderSingh13; 02-09-2015 at 03:48 AM..
This User Gave Thanks to RavinderSingh13 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm new to unix scripting.How can i call a script from another script.
I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted.
I tried using
#!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh
My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies
2. Shell Programming and Scripting
I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below......
vi hairy
bear=`grep bear animals`
if
then
ksh more_animals
fi
If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies
3. Shell Programming and Scripting
Ih all,
i have multiples ksh scripts for crontab's unix jobs
they all have same variables declarations and some similar functions
i would have a only single script file to declare my variables, like:
var1= "aaa"
var2= "bbb"
var3= "ccc"
...
function ab { ...}
function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies
4. Shell Programming and Scripting
Hi,
I need some help with the Ksh scripting....
I have a Script call Mail.ksh which calls Crank.ksh which calls Readdates.ksh whoch calls mindiff.ksh
the output of mindiff.ksh and Readdates.ksh are wirtten to a text file...
Here is how each file is called or executed...
./Mail.ksh 30... (3 Replies)
Discussion started by: bhagya2340
3 Replies
5. Shell Programming and Scripting
1. Script using bash
#!/bin/bash
a=4294967296
(( b=$a / 2 ))
echo "$a"
echo "$b"
*** output ***
4294967296
2147483648
2. Script using ksh
#!/bin/ksh
a=4294967296
(( b=$a / 2 ))
echo "$a"
echo "$b"
*** output ***
4294967296 (3 Replies)
Discussion started by: gautam.shrestha
3 Replies
6. Shell Programming and Scripting
Hi
I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email.
For example
-------
Script ABC
-------
a.ksh
b.ksh
c.ksh
I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies
7. UNIX for Dummies Questions & Answers
Hi ,
What is the diffence between executing the script like
./myscript.ksh
. ./myscript.ksh
I have found 2 difference but could not find the reason
1. If i export a variable in myscript.ksh and execute it like . ./myscript.ksh the i can access the other scripts that are present in... (5 Replies)
Discussion started by: max_hammer
5 Replies
8. Shell Programming and Scripting
I'm getting different behaviour when executing below script in debug option.
$ cat ss.ksh
ff=$(pwd)
echo " ff : $ff"
$ ksh ss.ksh
ff : /tmp
$ ksh -x ss.ksh
+ + pwd
ff=
+ echo ff :
ff :
I was getting this behaviour in my actuall script i'm able to reproduce this in simple script... (4 Replies)
Discussion started by: luckybalaji
4 Replies
9. Shell Programming and Scripting
Hi,
I have command like this with ooutput :
unix>tnsping abc
TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 17-AUG-2011 17:06:11
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
/opt/oracle/network/admin/sqlnet.ora
... (19 Replies)
Discussion started by: talashil
19 Replies
10. Shell Programming and Scripting
I have the following file:
one two three four
man women
yes no place togo
bad sleep
I need to move all lines that have only two words(columns) in a separate file and the rest in a separate file...
I used :
for $linecont in $(cat $filename); do
echo $linecont > temp
line1='cat... (7 Replies)
Discussion started by: daimne
7 Replies
LEARN ABOUT NETBSD
rump_sp
RUMP_SP(7) BSD Miscellaneous Information Manual RUMP_SP(7)
NAME
rump_sp -- rump remote system call support
DESCRIPTION
The rump_sp facility allows clients to attach to a rump kernel server over a socket and perform system calls. While making a local rump sys-
tem call is faster than calling the host kernel, a remote system call over a socket is slower. This facility is therefore meant mostly for
operations which are not performance critical, such as configuration of a rump kernel server.
Clients
The NetBSD base system comes with multiple preinstalled clients which can be used to configure a rump kernel and request diagnostic informa-
tion. These clients run as hybrids partially in the host system and partially against the rump kernel. For example, network-related clients
will typically avoid making any file system related system calls against the rump kernel, since it is not guaranteed that a rump network
server has file system support. Another example is DNS: since a rump server very rarely has a DNS service configured, host networking is
used to do DNS lookups.
Some examples of clients include rump.ifconfig which configures interfaces, rump.sysctl which is used to access the sysctl(7) namespace and
rump.traceroute which is used to display a network trace starting from the rump kernel.
Also, almost any unmodified dynamically linked application (for example telnet(1) or ls(1)) can be used as a rump kernel client with the help
of system call hijacking. See rumphijack(3) for more information.
Connecting to the server
A remote rump server is specified using an URL. Currently two types of URLs are supported: TCP and local domain sockets. The TCP URL is of
the format tcp://ip.address:port/ and the local domain URL is unix://path. The latter can accept relative or absolute paths. Note that
absolute paths require three leading slashes.
To preserve the standard usage of the rump clients' counterparts the environment variable RUMP_SERVER is used to specify the server URL. To
keep track of which rump kernel the current shell is using, modifying the shell prompt is recommended -- this is analoguous to the visual
clue you have when you login from one machine to another.
Client credentials and access control
The current scheme gives all connecting clients root credentials. It is recommended to take precautions which prevent unauthorized access.
For a unix domain socket it is enough to prevent access to the socket using file system permissions. For TCP/IP sockets the only available
means is to prevent network access to the socket with the use of firewalls. More fine-grained access control based on cryptographic creden-
tials may be implemented at a future date.
EXAMPLES
Get a list of file systems supported by a rump kernel server (in case that particular server does not support file systems, an error will be
returned):
$ env RUMP_SERVER=unix://sock rump.sysctl vfs.generic.fstypes
SEE ALSO
rump_server(1), rump(3), rumpclient(3), rumphijack(3)
HISTORY
rump_sp first appeared in NetBSD 6.0.
BSD
February 7, 2011 BSD