Sponsored Content
Full Discussion: How to set echo on
Top Forums Shell Programming and Scripting How to set echo on Post 89990 by siegfried on Thursday 17th of November 2005 10:41:59 AM
Old 11-17-2005
How to set echo on

I'm looking at my bash man page and I'm expecting to find some option that I can use to make it echo every command that it executes. The description of --verbose was pretty terse!

Is --verbose supposed to make it echo every command it executes?

My bash script script (named ws2) contains a single function (named ws) and I cannot get it to echo the commands.

Maybe I don't understand functions. When I type

bash --verbose ~/.bash/ws2

no commands are echoed. Could that be because there are no commands and only a single function?

OK,

Now I type

ws arg1 arg2

Hmm... It appears to execute. Now how do I make it echo every command?

Thanks,
Siegfried
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

set variable to Home, then echo it to screen

Major Newbie here folks. I'm trying to set a variable to my Home directory and then echo it to the screen. Any and all help is greatly appreciated. Thanks Anna (3 Replies)
Discussion started by: amidget
3 Replies

2. Shell Programming and Scripting

echo just 1 line before execution/set +-x

Suppose that you want to mostly not echo commands inside your script during execution (e.g. to not bog the user down with details that they do not care about) but that there is the occaisional script line that you would like to echo before you execute it. Is there an elegant way to achieve this?... (3 Replies)
Discussion started by: fabulous2
3 Replies

3. UNIX for Dummies Questions & Answers

How to correctly use an echo inside an echo?

Bit of a weird one i suppose, i want to use an echo inside an echo... For example... i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos... echo "echo "hello"" >$file echo "echo "goodbye"" >$file ... (3 Replies)
Discussion started by: mokachoka
3 Replies

4. Linux

set echo off command issue

Hi all, I am executing a Oracle SQL statement in a shell script and spooling the output of the query into a File with spool command. I want to ensure that only output of the query appears in file excluding the SQL statement but even set echo off command is not working. Please help (7 Replies)
Discussion started by: sumi_mn
7 Replies

5. Shell Programming and Scripting

why the set rr='echo string|cut not working

I am new to the c shell script, can you let me know why the set rr= is not working. C shell script #! /bin/csh Set tt= 12345_UMR_BH452_3_2.txt set rr='echo $tt | cut –d”_” -f1' syntax error (4 Replies)
Discussion started by: jdsignature88
4 Replies

6. UNIX for Dummies Questions & Answers

How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b: I stopped at .. :( #!/bin/sh A=`hostname -i` echo "server ip address is $A"... (4 Replies)
Discussion started by: zagaruika
4 Replies

7. Solaris

LC_ALL & LANG are set OK, but others couldn't set locale correctly.

Hi, I have a Solaris (SunOS 5.10) installed, by default with the en_AU.UTF-8 locale. I want to change it to en_US.UTF-8 With AU, I have no issues whatsoever, so I installed the language package and now locale -a shows "en_US.UTF-8". Problem is even with LC_ALL set in etc/default/init, the... (2 Replies)
Discussion started by: asdfg
2 Replies

8. UNIX for Dummies Questions & Answers

set echo off and on

Hi I have written a bash script to capture the output of jmap. The command i execute is jmap -heap <pid> This gives details of memory usage of the process with <pid>. Now jmap not only gives this info but also prints couple more lines, which i am not interested in. Here are the lines that I... (3 Replies)
Discussion started by: avinthm
3 Replies

9. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies
OPENVT(1)							     Linux 1.x								 OPENVT(1)

NAME
openvt - start a program on a new virtual terminal (VT). SYNOPSIS
openvt [-c vtnumber] [OPTIONS] [--] command DESCRIPTION
openvt will find the first available VT, and run on it the given command with the given command options, standard input, output and error are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the environment variable $SHELL is used. OPTIONS -c, --console=VTNUMBER Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work; -f, --force Force opening a VT without checking whether it is already in use; -e, --exec Directly execute the given command, without forking. This option is meant for use in /etc/inittab; -s, --switch Switch to the new VT when starting the command. The VT of the new command will be made the new current VT; -u, --user Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with -c or -l; -l, --login Make the command a login shell. A - is prepended to the name of the command to be executed; -v, --verbose Be a bit more verbose; -w, --wait wait for command to complete. If -w and -s are used together then openvt will switch back to the controlling terminal when the com- mand completes; -V, --version print program version and exit; -h, --help show this text and exit. -- end of options to openvt. NOTE
If openvt is compiled with a getopt_long() and you wish to set options to the command to be run, then you must supply the end of options -- flag before the command. EXAMPLES
openvt can be used to start a shell on the next free VT, by using the command: openvt bash To start the shell as a login shell, use: openvt -l bash To get a long listing you must supply the -- separator: openvt -- ls -l HISTORY
Earlier, openvt was called open. It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>. The -w idea is from "sam". SEE ALSO
chvt(1), doshell(8), login(1) 19 Jul 1996 V1.4 OPENVT(1)
All times are GMT -4. The time now is 11:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy