Sponsored Content
Top Forums Shell Programming and Scripting How to place the output of two different echo statements on one line Post 32180 by JoBa on Wednesday 20th of November 2002 07:56:37 AM
Old 11-20-2002
How to place the output of two different echo statements on one line

Hello there,

I wrote a shell script to modify the code for some of our clients in our client database. Before starting the data modification the program performs a few checks.

When a check is being performed, it should be shown on the screen of the user running the program, the result of the check should appear a few seconds later on the screen, on the same line.



for example.

.....
.....
.....
echo "Start check 1 for client" $1 ".........."


if [ check 1 = true ]
echo "OK"
else
echo "NOT OK"
exit
fi
.....
.....
.....


When I run my scripts, the result on the screen will be

$ data_modif.sh
Start check 1 for client A ..........
OK
$

What I would like it to be is
$ data_modif.sh
Start check 1 for client A..........OK
$

I have been trying for a few HOURS now to get the description of the check and the result of the check on the same line, but it seems hopeless.

Maybe someone can help me.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to write multiple echo statements in unix?

How to write multiple echo statements in unix? echo "************************************************************************************************************"; echo This Script do the following functions echo 1. Point 1 echo 2. Point 2 echo 3. Point 3 echo... (2 Replies)
Discussion started by: Shrutiduggal
2 Replies

2. Shell Programming and Scripting

Output of both the echo statement in one line

I have script like echo -n FINISHED FEXP: ${TABLE2EXP} echo $STATUS I want the output of both the echo statement in one line How can i do this (3 Replies)
Discussion started by: scorp_rahul23
3 Replies

3. Shell Programming and Scripting

Echo and a command's output on the same line

Hello, I'm writing some bash scripts and I'm trying to get an echo command and the output of another command to display on the same line. For example: I want to run echo "Operating System: " unameand have it displayed as Operating System: Darwin Thanks for your help! (7 Replies)
Discussion started by: codyhazelwood
7 Replies

4. Shell Programming and Scripting

howto place in one line output from two functions

Hi I would like to place in one line output from two functions. Both functions return text with print cmd. When I place above code in script it will place them in series. e.g. 1 #/bin/ksh 2 3 function1() 4 { 5 print "My name is" 6 ... (3 Replies)
Discussion started by: presul
3 Replies

5. Shell Programming and Scripting

echo two command output in the same line

Hi, I try to write script and echo two command at the same line . echo "A" echo "B" How can I pipe above two command at the same line in text file . So, in the output text file , you can see below ??? A B not A B Any sugggestion ??? (4 Replies)
Discussion started by: chuikingman
4 Replies

6. Shell Programming and Scripting

multiple echo statements in if condition

Hi , I have a peculiar problem. i have an if block like this if ; then echo " todays date is " ${date} >> log_file echo " file count is " $ count >> log_file mv filename1 filename 2 else echo "no files available ">> log_file fi the echo statement "no files available " is not... (2 Replies)
Discussion started by: wizardofoz
2 Replies

7. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

8. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies

9. Shell Programming and Scripting

BASH - Need to echo for loop output to one line

I'm trying to echo the release version of some of our Linux servers. Typically I do these types of things by "catting" a text file with the host names, "ssh-ing" to the host and running my string. This is what I've written for i in `cat versions.txt` ; do echo $i ; ssh $i cat /etc/issue |... (5 Replies)
Discussion started by: lombardi4851
5 Replies

10. Shell Programming and Scripting

Grep echo awk print all output on one line

Hello, I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it. I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies
SYNERGYC(1)						      General Commands Manual						       SYNERGYC(1)

NAME
synergyc -- synergy client SYNOPSIS
synergyc [-d level | --debug level ] [--display display ] [--daemon | { --no-daemon | -f } ] [-n name | --name name ] [--restart | { --no-restart | -1 } ] address synergyc { --help | -h } synergyc --version DESCRIPTION
Starts the synergyc mouse/keyboard sharing client. This manual page was written for the Debian distribution because the original program does not have a manual page. Slightly old documenta- tion exists in /usr/share/doc/synergy/obsolete/index.html; it is the most up-to-date information available, despite the pathname. OPTIONS
-d level --debug level use debugging level level. Debug levels are from highest to lowest: FATAL, ERROR, WARNING, NOTE, INFO, DEBUG, DEBUG1, and DEBUG2. Only messages at or above the given level are logged. Messages are logged to a terminal window when running in the foreground, and to syslog when running as a daemon. --display display connect to the X server at display --daemon run the client as a daemon. -f --no-daemon run in client the foreground. -n screen-name --name screen-name use screen-name instead of the hostname. This option lets the client use a name other than its hostname for its screen. This name is used when checking the configuration. --restart restart the client automatically if it fails. -1 --no-restart do not try to restart the client if it fails for some reason. -h --help display help and exit. --version display version information and exit. address address of server. address has one of the following forms: o hostname o hostname:port hostname is a hostname or address of a network interface on the server system. port is a port number from 1 to 65535. port defaults to 24800. RUNNING THE CLIENT
Run the client on all computers that aren't the server using the following command line: synergyc -f server-hostname Replace server-hostname with the hostname or address of the server system. The `-f' option causes synergy to run in the foreground. This option is recommended until you've verified that the configuration works. If you didn't include the system's hostname in the configuration file (either as a screen name or an alias) then you'll have to add `--name screen-name' to the command line, where screen-name is a name in the configuration file. The client should quickly report `connected to server'. If it does not but doesn't print an error and exit immediately then it's trying to connect to the server but cannot. It will time out in 30 seconds and exit (use ctrl+c to exit earlier). You should check that the server is running and is reachable over the network and try again. If the client fails and exits it should print an error describing the problem. Here are typical problems and possible solutions: o failed to open screen: check permission to open the X display check that the DISPLAY environment variable is set o already connected: check that the synergy client isn't already running o refused client: add client to the server's configuration file o connection failed: check server-hostname the server cannot open the desired port, stop the program using that port (24800) and restart the server Once all the clients are running, try moving the mouse to each screen. Be sure to check all the configured links. STARTING AUTOMATICALLY
Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. I recommend to start the synergy client from a start script of your desktop environment or window manager. The commands should look something like this: pkill synergyc synergyc [options] server-hostname If you are using GNOME, you can add the synergy client to the list of the non-session-managed startup programs. For doing this, start the control center, choose `Session Properties & Startup' and then `Startup Programs'. Add a new entry with `/usr/bin/synergyc server-hostname' as the startup command. options must not include `-f' or `--no-daemon'. It's important to make sure no old copies of synergy are running so they can't interfere with the new one. SEE ALSO
synergys(1) AUTHOR
This manual page was written by Daniel Lutz <danlutz@debian.org> for the Debian system. Edited by Titus Barik <barik@ieee.org>. SYNERGYC(1)
All times are GMT -4. The time now is 06:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy