Sponsored Content
Full Discussion: Variable Referencing
Top Forums Shell Programming and Scripting Variable Referencing Post 302442738 by milo7 on Thursday 5th of August 2010 10:06:54 AM
Old 08-05-2010
Variable Referencing

I am referencing variables in the following way

Code:
var1="greeting"
greeting="Welcome!"

How do I echo var1 in such a way that it outputs Welcome! ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Referencing variables in commands

The script I am writing must be able to run several commands (tar, gzip etc) on filenames that are supplied by variables. I am unsure as to what syntax is required/ideal when referencing variables in filenames. The following is a sample command that I would like the script to execute: tar cvf... (3 Replies)
Discussion started by: mharley
3 Replies

2. Programming

symbol referencing error

Undefined first referenced symbol in file std::basic_ostream<char, std::char_traits<char> >::operator<<(int)/var/tmp//ccTR std::cerr /var/tmp//ccTRcjui.o std::cout /var/tmp//ccTRcjui.o... (1 Reply)
Discussion started by: suhasini
1 Replies

3. Programming

Symbol referencing error

Hey everyone, I can't figure out this symbol referencing error after looking at it for the longest time, and I figured some fresh eyes might be able to point something out I am overlooking. Undefined first referenced symbol in... (1 Reply)
Discussion started by: fromatz
1 Replies

4. Shell Programming and Scripting

Referencing variable using another variable

Hello, I am new to shell scripting so this might be a simple question...also, please excuse me if this is a topic discussed before. I have declared a bunch of variables as such: Host_1=32 Host_2=33 Host_3=34 temp=1 numUsers=4 Now, I am trying to go through a loop to access each of these... (4 Replies)
Discussion started by: jb2780
4 Replies

5. Shell Programming and Scripting

Back Referencing in SED

Hi, I have tried all examples of back referencing from the web but all in vain. It would be heavily helpful if someone explains me the use of back referencing and sub expression using an example of substitution. Thanks (1 Reply)
Discussion started by: sinpeak
1 Replies

6. Shell Programming and Scripting

How to find out which jobs are referencing my AutoSys variable?

I need to list out all the AutoSys jobs that are referencing a particular AutoSys global variable. I know the autorep command will definitely need to be used here, and maybe grep as well, but I can't figure out exactly how it's to be done. For example, "autorep -q -J %jobnamewildcard% | grep... (1 Reply)
Discussion started by: dazzwater
1 Replies

7. Shell Programming and Scripting

Shell Script Referencing I/O

Is it possible to design a shell script to reference something that queries for input? (This is not to make a script to ssh) For instance if I have a command that when run, it does something like: %<Some command> User's password? Would it be possible to write a script to input something... (1 Reply)
Discussion started by: Prodiga1
1 Replies

8. Programming

Symbol referencing errors

Undefined first referenced symbol in file logf /var/tmp//ccwztFsO.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status float exponC(float mean) { index1++;... (1 Reply)
Discussion started by: willji1234
1 Replies

9. Shell Programming and Scripting

Referencing file for values and referencing another file to replace values

Hi I have a file which has values in each line: MP304,d40000 MP310,ff0000 etc I have another file which as the first value in it and is unique in the file(not repeated). I need to replace a string with the second value above. The second file contents is as follows:(snippet) <g ... (12 Replies)
Discussion started by: majikins
12 Replies

10. Shell Programming and Scripting

Dynamically referencing a Path

How would I reference a source path (where I have a script pulling data from) that changes location? For example, a Mail folder is being used as a source to pull some data, but somebody could move the folder around in the GUI of Mail, changing it's location in the filesystem (that I am referencing... (11 Replies)
Discussion started by: sudo
11 Replies
Smokeping_probes_AnotherSSH(3)					     SmokePing					    Smokeping_probes_AnotherSSH(3)

NAME
Smokeping::probes::AnotherSSH - Another SSH probe SYNOPSIS
*** Probes *** +AnotherSSH forks = 5 offset = 50% step = 300 # The following variables can be overridden in each target section greeting = SSH-Latency-Measurement-Sorry-for-this-logmessage interval = established mininterval = 0.5 pings = 5 port = 22 timeout = 5 # [...] *** Targets *** probe = AnotherSSH # if this should be the default probe # [...] + mytarget # probe = AnotherSSH # if the default probe is something else host = my.host greeting = SSH-Latency-Measurement-Sorry-for-this-logmessage interval = established mininterval = 0.5 pings = 5 port = 22 timeout = 5 DESCRIPTION
Latency measurement using SSH. This generates Logfile messages on the other Host, so get permission from the owner first! VARIABLES
Supported probe-specific variables: forks Run this many concurrent processes at maximum Example value: 5 Default value: 5 offset If you run many probes concurrently you may want to prevent them from hitting your network all at the same time. Using the probe- specific offset parameter you can change the point in time when each probe will be run. Offset is specified in % of total interval, or alternatively as 'random', and the offset from the 'General' section is used if nothing is specified here. Note that this does NOT influence the rrds itself, it is just a matter of when data acqusition is initiated. (This variable is only applicable if the variable 'concurrentprobes' is set in the 'General' section.) Example value: 50% step Duration of the base interval that this probe should use, if different from the one specified in the 'Database' section. Note that the step in the RRD files is fixed when they are originally generated, and if you change the step parameter afterwards, you'll have to delete the old RRD files or somehow convert them. (This variable is only applicable if the variable 'concurrentprobes' is set in the 'General' section.) Example value: 300 Supported target-specific variables: greeting Greeting string to send to the SSH Server. This will appear in the Logfile. Use this to make clear, who you are and what you are doing to avoid confusion. Also, don't use something that is a valid version string. This probe assumes that the connection gets terminated because of protocol mismatch. Default value: SSH-Latency-Measurement-Sorry-for-this-logmessage interval The interval to be measured. One of: connect Interval between connect() and the greeting string from the host. established Interval between our greeting message and the end of the connection because of Protocol mismatch. This is the default. complete From connect() to the end of the connection. Default value: established mininterval Minimum interval between the start of two connection attempts in (possibly fractional) seconds. Default value: 0.5 pings How many pings should be sent to each target, if different from the global value specified in the Database section. Note that the number of pings in the RRD files is fixed when they are originally generated, and if you change this parameter afterwards, you'll have to delete the old RRD files or somehow convert them. Example value: 5 port Connect to this port. Default value: 22 timeout Timeout for the connection. Default value: 5 AUTHORS
Christoph Heine <Christoph.Heine@HaDiKo.DE> 2.6.8 2013-03-17 Smokeping_probes_AnotherSSH(3)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy