03-28-2012
Hi Thanks for the response.
@suhasingale:yeah that's correct but problem is we cannot connect to the other server because it is in different network.
what is my plan is develop a script and execute it first our envrionment and will send the script to the other server owner and ask them to send the out put file after running the same script.from there will compare two files outputs.
@rangarasan: Can we get the count also at the end to get an idea of the how many files are present in the perticular directory.
10 More Discussions You Might Find Interesting
1. Linux
I wrote a simple program which will create a child process to execute a command and the output will be redirected to the file.
Please have a look at the following code ->
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
void execute(char **argv)
{
... (0 Replies)
Discussion started by: sandiworld
0 Replies
2. Shell Programming and Scripting
I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together.
I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies
3. Shell Programming and Scripting
Hello!
Sorry, for my not so perfect english!
I want to stop bash shell script execution until any key is pressed.
This line in a bash shell script
read -n1 -r -p "Press any key to continue..." key
produces this error
When I run this from the command line
usera@lynx:~$ read... (4 Replies)
Discussion started by: linuxinho
4 Replies
4. UNIX for Dummies Questions & Answers
Hi there,
I'm puzzled. Compressing the same file (same name, same md5sum) at two different times will produce a different output. I mean the md5sum of the resulting .gz files are different.
Does it make any sens to any of you?
I'd like some explanations if you know what's going on.
Thanks... (4 Replies)
Discussion started by: chebarbudo
4 Replies
5. UNIX for Advanced & Expert Users
All,
PLease can you help me with a shell script which can compare two xml files and print the difference to a output file.
I have attached one such file for you reference.
<Group>
<Member ID=":Year_Quad:41501" childCount="4" fullPath="PEPSICO Year-Quad-Wk : FOLDER.52 Weeks Ending Dec... (2 Replies)
Discussion started by: kanthrajgowda
2 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all... (2 Replies)
Discussion started by: jsk319342
2 Replies
7. UNIX for Dummies Questions & Answers
cat a
.a
ba
.b
bb
.c
bc
sort a
.a
.b
ba
bb
bc
.c
NOTE: .a and .b appears before ba and bb, where as .c appears after bc.
In general (3 Replies)
Discussion started by: ajb
3 Replies
8. Shell Programming and Scripting
Beginner/Intermediate shell; comfortable in the command line.
I have been looking for a solution to a backup problem. I need to compare Directory 1 to Directory 2 and copy all modified or new files/directories from Directory 1 to Directory 3. I need the directory and file structure to be... (4 Replies)
Discussion started by: Rod
4 Replies
9. Shell Programming and Scripting
Hello,
I need help in writing the shell script for below mentioned case.
There are 2 servers(server A, server B).
A cronjob syncs files between these 2 servers.
Existing script is copying files from A to B.
This is done using the command rsync.
However, the files are not deleted... (2 Replies)
Discussion started by: SravaniVedam11
2 Replies
10. Shell Programming and Scripting
When I run the awk below, I get an error message
awk -v OFS='\t' '$(NF-1)=="Benign" || ($(NF-2) OFS $(NF-1))=="Likely Benign" {$(NF)=$(NF-2) OFS $(NF-1)} {print $0 }' input
awk: cmd. line:1: (FILENAME=VUS FNR=8) fatal: attempt to access field -1
input
Chr Start End Ref ... (6 Replies)
Discussion started by: cmccabe
6 Replies
send(n) Tk Built-In Commands send(n)
__________________________________________________________________________________________________________________________________________________
NAME
send - Execute a command in a different application
SYNOPSIS
send ?options? app cmd ?arg arg ...?
_________________________________________________________________
DESCRIPTION
This command arranges for cmd (and args) to be executed in the application named by app. It returns the result or error from that command
execution. App may be the name of any application whose main window is on the display containing the sender's main window; it need not be
within the same process. If no arg arguments are present, then the command to be executed is contained entirely within the cmd argument.
If one or more args are present, they are concatenated to form the command to be executed, just as for the eval command.
If the initial arguments of the command begin with "-" they are treated as options. The following options are currently defined:
-async Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd to complete in
the target application; no result will be available and errors in the sent command will be ignored. If the target application is
in the same process as the sending application then the -async option is ignored.
-displayof pathName
Specifies that the target application's main window is on the display of the window given by pathName, instead of the display con-
taining the application's main window.
-- Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading "-" character.
APPLICATION NAMES
The name of an application is set initially from the name of the program or script that created the application. You can query and change
the name of an application with the tk appname command.
DISABLING SENDS
If the send command is removed from an application (e.g. with the command rename send {}) then the application will not respond to incom-
ing send requests anymore, nor will it be able to issue outgoing requests. Communication can be reenabled by invoking the tk appname com-
mand.
SECURITY
The send command is potentially a serious security loophole. On Unix, any application that can connect to your X server can send scripts to
your applications. These incoming scripts can use Tcl to read and write your files and invoke subprocesses under your name. Host-based
access control such as that provided by xhost is particularly insecure, since it allows anyone with an account on particular hosts to con-
nect to your server, and if disabled it allows anyone anywhere to connect to your server. In order to provide at least a small amount of
security, Tk checks the access control being used by the server and rejects incoming sends unless (a) xhost-style access control is enabled
(i.e. only certain hosts can establish connections) and (b) the list of enabled hosts is empty. This means that applications cannot con-
nect to your server unless they use some other form of authorization such as that provide by xauth. Under Windows, send is currently dis-
abled. Most of the functionality is provided by the dde command instead.
EXAMPLE
This script fragment can be used to make an application that only runs once on a particular display.
if {[tk appname FoobarApp] ne "FoobarApp"} {
send -async FoobarApp RemoteStart $argv
exit
}
# The command that will be called remotely, which raises
# the application main window and opens the requested files
proc RemoteStart args {
raise .
foreach filename $args {
OpenFile $filename
}
}
KEYWORDS
application, dde, name, remote execution, security, send
Tk 4.0 send(n)