Sponsored Content
Top Forums Shell Programming and Scripting [QUESTION] echoing a variable Post 302731637 by Corona688 on Thursday 15th of November 2012 01:06:54 PM
Old 11-15-2012
Ah, use single quotes. '$mmc' and it will not substitute.

I don't know why you'd want that, as $mmc in a text file isn't really useful. It will be very difficult to turn it back into a variable later.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

echoing two variables in one statement

I have the following -------------------- foreach var (STO SNY WKF) set ta = 5 end --------- How can I echo both variables at the same time. Something to the effect of echo ${$var}ta But this doesn't work. Seems like it would. Thanks. (4 Replies)
Discussion started by: wxornot
4 Replies

2. UNIX for Dummies Questions & Answers

echo not echoing correctly

Here is the file named tuwork.......... 209 200 WZ 6529 SKTNCA01X4X C POI LODI LODI 738 SKTNCA0127T LOD Here is the scipt....... cat tuwork | while read rva do num=`echo $rva | cut -d" " -f1-2` reg=`echo $rva | cut -c10` ocn=`echo $rva | cut -c12-15` x=`echo $rva | cut -c29`... (3 Replies)
Discussion started by: shorty
3 Replies

3. Shell Programming and Scripting

Echoing

I was just wondering how you would echo out different length variables but still have them all line up. I tried putting tabs between the variables but that didn't work as planned. For example this is in some loop, with different variables in it each time: echo "$1 $2 $3 $4 $5" Appears like... (3 Replies)
Discussion started by: Okema
3 Replies

4. Shell Programming and Scripting

Echoing weird variables.

kindly find below:- var="'(]\\{}\$\"" echo $var # it wil give this '(]\{}$" echo "$var" # '(]\{}$" Doesn't make a difference why???. if we set IFS to '\' also the below happens IFS='\' echo $var # '(] {}$" \ converted to space. Why? weird!! echo "$var"... (3 Replies)
Discussion started by: ahmad.diab
3 Replies

5. Shell Programming and Scripting

echoing date command into file

I want to echo into file1 echo & date commands, which in turn will be echoed into file2 string and the current date. So when I'll run file1 it will echo into file2 the commands 'echo' & 'date' My problem is that the date command turns into the actual date value. Example:... (2 Replies)
Discussion started by: liav
2 Replies

6. Shell Programming and Scripting

Variable to command to Variable Question KSH

Hello, First post for Newbie as I am stumped. I need to get certain elements for a specific PID from the ps command. I am attempting to pass the value for the PID I want to retrieve the information for as a variable. When the following is run without using a variable, setting a specific PID,... (3 Replies)
Discussion started by: Coyote270WSM
3 Replies

7. Shell Programming and Scripting

Echoing command results

Sorry folks, Second time today. I am working on a script that accepts data via pipe and processes it. I expect it to work as: # command | ProcScript.sh Within ProcScript.sh, I want to be able to give the target of the prev run command I am using history 2 | grep -v history | awk... (18 Replies)
Discussion started by: Marc G
18 Replies

8. Shell Programming and Scripting

Echoing silently?

I know, sounds mutually exclusive :-) I have a script where I ask for a password and store it in a variable, and then use it with sudo on an array of other hosts. The password winds up being choed back to my terminal as well as to the process on the remote host, like: Attempting to update... (2 Replies)
Discussion started by: jnojr
2 Replies

9. Shell Programming and Scripting

Echoing only once for each subdir

I have a script that runs from this: for i in * ; do (cd $i && echo $i && /test1/execute/testb);done this is testb: for file in `ls *.txt` do if && && && && && ; then echo "NO"; break 1; else echo "it is there" fi done What is happening is that I can get it to run a... (19 Replies)
Discussion started by: newbie2010
19 Replies

10. UNIX for Beginners Questions & Answers

Getopts not echoing correctly

Hi, When I run the the following code: #!/bin/bash if ]; then usage fi if ] then echo "Do not execute this as root, use -s instead" fi SERVERFILE="servers" function usage { echo "USAGE: ${0} COMMAND" (4 Replies)
Discussion started by: mohca2020
4 Replies
SHOREWALL-TCPRI(5)						  [FIXME: manual]						SHOREWALL-TCPRI(5)

NAME
tcpri - Shorewall file SYNOPSIS
/etc/shorewall/tcpri DESCRIPTION
This file is used to specify the priority of traffic for simple traffic shaping (TC_ENABLED=Simple in shorewall.conf[1](5)). The priority band of each packet is determined by the last entry that the packet matches. If a packet doesn't match any entry in this file, then its priority will be determined by its TOS field. The default mapping is as follows but can be changed by setting the TC_PRIOMAP option in shorewall.conf[1](5). TOS Bits Means Linux Priority BAND ------------------------------------------------------------ 0x0 0 Normal Service 0 Best Effort 2 0x2 1 Minimize Monetary Cost 1 Filler 3 0x4 2 Maximize Reliability 0 Best Effort 2 0x6 3 mmc+mr 0 Best Effort 2 0x8 4 Maximize Throughput 2 Bulk 3 0xa 5 mmc+mt 2 Bulk 3 0xc 6 mr+mt 2 Bulk 3 0xe 7 mmc+mr+mt 2 Bulk 3 0x10 8 Minimize Delay 6 Interactive 1 0x12 9 mmc+md 6 Interactive 1 0x14 10 mr+md 6 Interactive 1 0x16 11 mmc+mr+md 6 Interactive 1 0x18 12 mt+md 4 Int. Bulk 2 0x1a 13 mmc+mt+md 4 Int. Bulk 2 0x1c 14 mr+mt+md 4 Int. Bulk 2 0x1e 15 mmc+mr+mt+md 4 Int. Bulk 2 The columns in the file are as follows. BAND - {1|2|3} Classifies matching traffic as High Priority (1), Medium Priority (2) or Low Priority (3). For those interfaces listed in shorewall-tcinterfaces[2](5), Priority 2 traffic will be deferred so long and there is Priority 1 traffic queued and Priority 3 traffic will be deferred so long as there is Priority 1 or Priority 2 traffic to send. PROTO - protocol Optional. The name or number of an IPv4 protocol. PORT(S) - port [,...] Optional. May only be given if the the PROTO is TCP (6), UDP (17), DCCP (33), SCTP (132) or UDPLITE (136). A list of one or more port numbers or service names from /etc/services. Port ranges of the form lowport:highport may also be included. ADDRESS - [address] Optional. The IP or MAC address that the traffic originated from. MAC addresses must be given in Shorewall format. If this column contains an address, then the PROTO, PORT(S) and INTERFACE column must be empty ("-"). INTERFACE - [interface] Optional. The logical name of an interface that traffic arrives from. If given, the PROTO, PORT(S) and ADDRESS columns must be empty ("-"). Note INTERFACE classification of packets occurs before classification by PROTO/PORT(S)/ADDRESS. So it is highly recommended to place entries that specify INTERFACE at the top of the file so that the rule about last entry matches is preserved. HELPER - [helper] Optional. Names a Netfiler protocol helper module such as ftp, sip, amanda, etc. A packet will match if it was accepted by the named helper module. You can also append "-" and a port number to the helper module name (e.g., ftp-21) to specify the port number that the original connection was made on. FILES
/etc/shorewall/tcpri SEE ALSO
http://shorewall.net/configuration_file_basics.htm#Pairs prio(8), shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5), shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-netmap(5), shorewall-params(5), shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5), shorewall-zones(5) NOTES
1. shorewall.conf http://www.shorewall.net/manpages/shorewall.conf.html 2. shorewall-tcinterfaces http://www.shorewall.net/manpages/shorewall-tcinterfaces.html [FIXME: source] 06/28/2012 SHOREWALL-TCPRI(5)
All times are GMT -4. The time now is 09:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy