You will have to define the function on each node separately, and the local variables like FILESZ1 won't be available there.
How about creating a server file like
to which you could even add your local server entry (user@server1) as the first line provided it has an sshd service running, and then, using shell arrays for the file sizes
leaving you with two file size arrays of four elements each to work upon locally. Admittedly, this has been tested on bash only, as I don't have a ksh machine here, but corrections - if necessary at all - should be minor.
Is there a command that will return the name of the largest file within a directory? If so, can I set the returned filename into a variable? (4 Replies)
Hello every one,
Iam newbie to this forum and shell programming &scripting.
i needed to compare each and every folder of two separate servers.
Actually I have copied some directory structure from one server to second server, to build on second server the files all should be copied... (3 Replies)
hi
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out1
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out2
diff out1 out2
i tried this it will work fine and i can see difference
but i need a script which should neglect, if the difference b/w files is small
and
it should display... (5 Replies)
Hello,
I am working with KSH on AIX and I have 2 files generated from different sources... as seen below:
FILE1 FILE2
AAA AAA@ABS0001C
BBB BBB@ABS0003D
CCC CCC@ABS0023A
DDD DDD@ABC0145D
EEE EEE@ABS0090A
FFF FFF@ABS0002A
GGG GGG@ABC0150D
HHH
FILE1 is main main data source,... (4 Replies)
I need to get a file size and compare it to a previous day file size. If it's larger or smaller by 50 percent I'll replace the new with the old. I know how to get the file sizes but do not know how to calculate if it's 50 percent difference.
Thanks for your help. (2 Replies)
Hi everyone!
I need to compare two file sizes.
One of them (size) will be stored in a flat file and the other coming from a listed file.
I can now get the first file size using:
SIZE=`ls -l $DOCTYPE | awk '{print $5}'`
1. How can I store this value in a flat file?
2. How... (2 Replies)
I need to write a bash script larger X Y that compares the sizes of two specified files X and Y,
and reports which file is larger. For example, if X is larger, the output should be "File X is larger",
while if Y is larger, the output should be "File Y is larger".
If the files are exactly the... (3 Replies)
Hello,
I have an output file showing database sizes across the 3 environments that I use (LIVE, TEST & DEVELOPMENT).
I am trying to write a script that lets me know if the size of a db on one environment is different to its corresponding db on the other environments.
Here is an example... (4 Replies)
Hi,
I am running a script that connets to a list of servers with SSH and runs a command but I have some servers that are asking for password (authorized keys is not configured properly).
Is there any way to do so that if I get a prompt for password just skip that entry?
my script:
... (1 Reply)
Hi,
I created a skript in ksh which generate a file with semicolon as separator, this is an example of the file a created:
example content file:
hello;AAAA;2014-08-17
hello;BBBB;2014-08-17
hello;CCCC;2014-08-17
I would need to compare the content in of the second column of this file... (3 Replies)
Discussion started by: jmartin
3 Replies
LEARN ABOUT SUNOS
create-instance
asadmin-create-instance(1AS)asadmin-create-instance(1AS)y" "User Commands"
NAME
asadmin-create-instance, create-instance - creates an application server instance with the specified instance name
SYNOPSIS
create-instance [--user admin_user] [-password admin_password] [--host localhost] [--port 4848] [--sysuser sys_user] [--domain
domain_name] [--local=false] [--passwordfile filename] [--secure|-s]--instanceport instanceportinstance_name
You can create a new instance on a local or remote machine. If on the remote machine an administration server is already running for the
specified hostname, then the system defaults to the local hostname. To create the instance locally, not requiring the administration
server to be up and running, specify the --local option. The named instance must not exist within that domain.
OPTIONS --user administrative user associated for the instance.
--password administrative password corresponding to the administrative user.
--host host name of the machine hosting the administrative instance.
--port administrative port number associated with the administrative host.
--sysuser owner of the domain directory.
--domain name of the domain.
--local determines if the command should delegate the request to administrative instance or run locally.
--passwordfile file containing passwords appropriate for the command (e.g., administrative instance).
--secure if true, uses SSL/TLS to communicate with the administrative instance.
--instanceport port where the instance listens for requests.
OPERANDS
instance_name name of the instance to be created.
Example 1: Using create-instance in local mode
asadmin> create-instance --domain domain1 --instanceport 8967 --sysuser adminuser server4
Created Instance server4 successfully
Where: the server4 instance is created under the domain1 domain.
Example 2: Using create-instance in remote mode
asadmin> create-instance --sysuser adminuser --user admin
--password adminadmin --host localhost --port 4848 --instanceport 8967 server4
Created Instance server4 successfully
Where: the server4 instance is created on the remote server for the associated user, password, host, and port.
EXIT STATUS
0 command executed successfully
1 error in executing the command
INTERFACE EQUIVALENT
Application Server instances page
asadmin-delete-instance(1AS), asadmin-start-instance(1AS), asadmin-stop-instance(1AS), asadmin-restart-instance(1AS)J2EE 1.4 SDK/refmiscinfo> March 2004 asadmin-create-instance(1AS)