Sponsored Content
Operating Systems Linux Local shell script need to be executed on a remote linux box Post 302191138 by sumitc on Thursday 1st of May 2008 03:56:52 PM
Old 05-01-2008
Sort Command!

When I am sorting a file I am getting a warning message
"Warning: A newline character was added to the end of file".

Please let me know hwy I am getting these warnings.

Thanks
Sumit
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to Reboot a linux box from a windows box

HI All, I need a script to reboot a linux box from a windows box. The script needs to run automatically whenever a sitescope alerts with an error message. Have searched for this in the forums, but could not get something relative. Pls. let me know the various alternatives we have to do... (2 Replies)
Discussion started by: Crazy_murli
2 Replies

2. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

3. Linux

How to find remote Linux box login account without login in to that box?

Hi, How to find remote Linux box login account without login in to that box? I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout? Thanks, --Muthu. (3 Replies)
Discussion started by: Muthuselvan
3 Replies

4. UNIX for Dummies Questions & Answers

SQL block in a Shell Script connecting to a local and remote DB

Hi All, In a Shell scriipt with a SQL block I want to issue a query against a local DB and a remote DB on a remote server. The shell script is running locally. This is how I connect to the local server. But I want the query to reference remote table in the join. Question can I specify a... (1 Reply)
Discussion started by: daveu7
1 Replies

5. Shell Programming and Scripting

To run a local shell script in a remote machine by passing arguments to the local shell script

I need to run a local shell script on a remote machine. I am able to achieve that by executing the command > ssh -qtt user@host < test.sh However, when I try to pass arguments to test.sh it fails. Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies

6. UNIX for Dummies Questions & Answers

Copy files from Linux server local windows machine using a shell script

Hello, I need to create a shell script which will copy files - which are created on particular date and starting with particular name - to local windows XP machine. Is this possible.? Currently it is being done manually using winscp (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

7. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

8. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

9. Shell Programming and Scripting

Linux/bash Script only working if executed from shell prompt

Hi, maybe I'm asking a VERY dumb question, but would anybody out there tell me, why this f****** script won't work if executed as a cronjob, but works fine if executed from a shell prompt? #! /bin/bash set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin date >>... (3 Replies)
Discussion started by: beislhur
3 Replies

10. Shell Programming and Scripting

Except script to run a local shell script on remote server using root access

local script: cat > first.sh cd /tmp echo $PWD echo `whoami` cd /tmp/123 tar -cvf 789.tar 456 sleep 10 except script: cat > first #!/usr/bin/expect set ip 10.5.15.20 set user "xyz123" set password "123456" set script first.sh spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies
stuserio(3)						    ShapeTools Toolkit Library						       stuserio(3)

NAME
stLog, stQuietFlag, stShutupFlag, stProgramName, stMessage, stGetFromStdin, stAskConfirm, stGetTermWidth - user interaction SYNOPSIS
#include <config.h> #include <sttk.h.h> voidstLog (char *logMsg, int logType); int stQuietFlag; int stShutupFlag; char*stProgramName; charstMessage[]; char*stGetFromStdin (int termChar); int stAskConfirm (char *message, char *defaultAnswer); int stGetTermWidth (int fdes); DESCRIPTION
These functions do the dialogue with the user. stLog outputs a message to the user's terminal. The message text is given in the logMsg buf- fer. logType is one of ST_LOG_MSG Message to be sent to standard output. ST_LOG_MSGERR Message to be sent to standard error. ST_LOG_WARNING Warning message, preceded by the string `programName - warning:', going to standard error. ST_LOG_ERROR Error message, preceded by the string `programName - error:', going to standard error. Additionally, when the flag ST_LOG_NONL is ored to the message type (e.g. `ST_LOG_MSG | ST_LOG_NONL'), the message is printed without adding a newline character. Otherwise, a newline is always added. Whether a message really makes it's way to the user, depends on the variables stQuietFlag and stShutupFlag. When stQuietFlag is set to a non null value, all messages except error messages (ST_LOG_ERROR) will be suppressed. With the stShutupFlag set to a null value, all mes- sages will be suppressed. Initially, both flags are set to NULL. The stProgramName pointer should be set pointing to a buffer containing the name how the program was called. It is used for composing proper error messages and warnings (see above). stMessage is a buffer for constructing messages using sprintf(3). It is designed to be large enough to hold a file's pathname and an addi- tional short message. It's size is MAXPATHLEN+128. stGetFromStdin reads from stdin a text terminated by ^D or by the specified single character termChar at the beginning of a new line. If termChar is -1 text is terminated by ^D. stAskConfirm returns true if the answer is equivalent to defaultAnswer (assumption). stGetTermWidth returns the actual with of the user's termainal in columns. BUGS
stGetTermWidth will not work on all machines properly. In it's current implementation, it is quite SUN specific. sttk-1.7 Thu Jun 24 17:43:39 1993 stuserio(3)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy