General :: Setting Variables From A Template?

Aug 23, 2010

Is there a way I can write a file that contains the text which assigns variables, e.g. string="hello world" in a file say, variables.txt and have a shell script assign those variables locally e.g.

#!bin/bash
command_that_saves_variables_locally variables.txt
echo $string
and when I run the script I would get an output of
"hello world"

View 2 Replies


ADVERTISEMENT

General :: Setting Up Variables (in RDGEN)

Jan 17, 2010

I have installed RDGEN which comes with VPFIT package. When I run the program it says:
"Failed to find help file"
But I ran the program from its main directory where all the files including help files exist. I think maybe the problem is because of this that THEY say:
"Some environment variables should be set before starting RDGEN".
But I do not know what does this mean and how to do that.

These are the variables:
-ATOMDIR
-RD PRSETUP
-RD PRSETUP
-RDSTART
-VPFSETUP
-VPFPLOTS
Would it be possible for you to tell me what does Setting Variable means in this case?

View 2 Replies View Related

General :: Setting (permenant) Environment Variables In 10.0.4

Sep 4, 2010

I am running an application which requires setting environment variables to be set.At the moment, the way I am achieving this is by exporting the EV at the command line, and then running the app from the command line.I want to be able to run the app from my menu (it is already a menu item after I installed it).How may I set the env var so that it is always available, so I can just run the app from the menu instead of from the CLI?

View 1 Replies View Related

General :: Ubuntu - Setting Environment Variables Permanently Under GNU Systems

Aug 25, 2011

I was using the command export, but it looks that after some time the set variables disappears. What is the easiest way of setting an environment variable forever?

View 2 Replies View Related

Programming :: Setting Variables In C-shell?

Jul 12, 2010

I'm running into a problem when I try to set a variable to an awk output in c-shell. Right now my command is Code: set STR_MSG_TYPE = `awk -F{ '/msg_type/ {print $2}' <filename> | tr -d }'/''*' ` I then run echo to see what the output is and it returns blank, however, when I run the same awk command from the command line, I get an actual output of "MT-715". Am I setting my variable incorrectly? I do something similar using the date command to set a STR_DATE variable earlier in the code and it works fine and I use the same syntax.

View 1 Replies View Related

Ubuntu :: Setting Environment Variables In Server 10.04

Jul 4, 2011

I always have to google about setting environment path variables when I install new software. My basic problem is that I dont know whether these variables need to be set globally or not. I have read a number of mails/tutorials which say that Environment variables should be set by simply doing an export ..eg EDITOR=nano export EDITOR

additionally I have read that it should be written into /etc/bash.bashrc

But are these really global variables or local? I want the variables to be set
even after I have logged out.

so I could also write the variable here...

/etc/environment

or here

/etc/profile

View 1 Replies View Related

Red Hat / Fedora :: Permanently Setting Environmental Variables?

Aug 6, 2010

I installed Java on a server and anytime I have to start or stop a service that requires the $JAVA_HOME variable I have to manually set it with the export command such as: Code: export JAVA_HOME=/usr/java-jdk1.6.0_21 How can I permanently set this variable?

View 3 Replies View Related

Red Hat :: Setting System Wide Shell Variables In RHEL5?

May 10, 2010

I have an RHEL 5 server joined to a windows domain. However I wanted to add variable lines to be executed each time a user logs in. However I succeeded to put them in /etc/bashrc file and it worked like a charm.
But its annoying that everytime the user logs in to the shell remotely it displays the whole variables that were declared. Is there a way how to add them once and not to display the output each time the user logs in?

View 10 Replies View Related

General :: Make A Template For Thunderbird?

Dec 28, 2010

I want to make a template for Thunderbird. I want the image to be on top and I will put fonts under it. My attempts at inserting an image have resulted in one very large image taking up the entire page.

View 2 Replies View Related

General :: Insert (Same Template Strings) Column With VI

Jun 24, 2011

I have this piece of code with some template strings.

Code:
Big_L: $Big_L
$Big_R
$Lambda_tf
$Epsilon_1
$mu
$n_0
$ms
$Delta_R
$Epsilon_2
$Lambda_d
$Epsilon_3
$Small_N
$Small_Q

How can I insert exactly the same template strings in front of each string, but just without the '$' sign (see the first line for an example)?

View 7 Replies View Related

Ubuntu :: Bash Script With Variables And Editing Variables

Apr 6, 2011

mkvmerge -o <filename without extension>_TV.mkv -S <filename> && mkvextract tracks <filename> 3:<filename without extension>.*** && perl /home/brian/Desktop/ass2srt.pl <filename without extension>.*** && rm <filename without extension>.***

Doing these commands for multiple command line file inputs is the goal. So I can just type ./script.sh *.mkv in my terminal.This is what I have so far, but it doesn't work whatsoever.

View 2 Replies View Related

General :: Create New Template Where Creating User Account (possixAccount)?

Jan 14, 2011

creating template (phpldapadmin 1.2.0.5). I create new template where im creating User Account (possixAccount) but i need to create Generic: Ldap Alias that will be created in other ou than account and i need both in one template.

View 1 Replies View Related

General :: Windows - How To Let Scite To Support A Cutom Syntax Highlight Template?

Mar 1, 2011

I need to have a syntax highlighter for a language of mine.

View 1 Replies View Related

General :: Setting Time And Date / Setting Calendar Format?

May 14, 2010

Have installed Suse 11.2. how can I change the calendar format dd/mm/yyyy and how to configure the system to sync.from an ntp?

View 1 Replies View Related

General :: Network Setting / Change Eth0 Setting?

May 4, 2010

I have a ubuntu server , can advise if I want to change the network setting ( eg. IP address , gateway address etc ) , which one is the configuration file ? for example , if I want to change eth0 setting , what file I should update ?

View 10 Replies View Related

General :: Using Variables In CURL?

Jul 12, 2010

using variables in CURL.Here's my code:

transfer_to_pcid="AAAAAAAA"
transfer_from_pcid="BBBBBBBB"
basic_password=`ssh rsync@some_test_domain 'curl --silent

[code]....

View 2 Replies View Related

General :: Any Other Ways To Set Environment Variables

May 20, 2010

I am running Red Hat Linux Enterprise 5; I am always using the export command to set environment variables.Are there any other ways to set environment variables and what are the advantages/disadvantages of them?

View 4 Replies View Related

General :: Referring To Variables In Bash?

Sep 13, 2010

Is there a difference when variables are referred to as $variableName and ${variableName} in bash?

View 1 Replies View Related

General :: Gnuplot Variables Into Shell?

Feb 17, 2010

in gnuplot it's possible to set the value of a variable via linux shell command.or instance we can do

Code:
a="`echo 1`"
b="`echo 2`"

[code]...

View 3 Replies View Related

General :: Concatenate Two Variables With Underscore?

Jun 4, 2010

I have question regarding concatenation of two variables with underscore.i.e. (bourne shell)

Code:
# var1=123
# var2=456

[code]...

View 3 Replies View Related

General :: Environment Variables Not Being Set Correctly?

Jun 21, 2010

he $g09root is picked up ( in both the csh and the bash), but not the $GV_DIR or the $GAUSS_SCRDIR. I guess it's some stupid error, but it is highly frustrating.Here is the .profile file:Quote:

# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
#

[code]...

View 9 Replies View Related

General :: Experimenting With Shell Variables?

Oct 12, 2010

Explain the following unexpected results

$ whereis date
date: /bin/date ?
$ echo $ PATH

[code]...

View 5 Replies View Related

General :: List The Variables That Are Used In A Script?

May 9, 2010

Is there a command that can list the variables that I am using in a script? I mean the variables that I created in the script not the environment or local variables. For example if I have a script that has the following var's like : name=Alex, age=20, postal_code=12345, how can I list them all @ once WITHOUT using echo $name, $age and so on. Imagine I have a lot of variables and i can't echo them all.

View 2 Replies View Related

General :: Unable To Get External Variables In Awk

May 25, 2010

In the following lines I am trying to replace Puppy Linux 5.0 Released with the content of external variable Var. Following lines are in a file called news

Code:

<A title="Puppy Linux 5.0 Released" href="http://lwn.net/Articles/388754/" rel=bookmark><FONT color=#ffffff size=2><STRONG>Puppy Linux 5.0 Released
</STRONG></A><STRONG>  |  </STRONG>

I have tried following.

Code:

awk -v var=NewNews '/title="[^"]*/{n+=1}{if (n==1){sub(/title="[^"]*/,"title="$var",$0)};print }' news

But it is replacing Puppy Linux 5.0 Released as $var, not with the contents of var.

View 4 Replies View Related

General :: Renaming Variables In A List

Mar 14, 2011

I am trying to rename a list of variables in my script using a second list of variables. I want the variables in the second list to replace the variables in the first list such that the first variable in List 1 is renamed after the first variable in List 2, the second variable in List 1 is renamed after the second variable in List 2, the third variable in List 1 is renamed after the third variable in List 2, and so on.

For example:

I know how to rename each file individually, but would like to run Do Loop which can rename all my output files at once.

View 7 Replies View Related

General :: Resolving Variables In FTP Session

Jun 28, 2011

I set a variable before entering the FTP session (vDate). Then it does not seem to resolve when I try to use it in the session as part of an mput command. $vDate resolves as an empty value. Can you point me in the right direction?

View 1 Replies View Related

General :: Variables Between Shell Scripts?

May 20, 2010

Ive created some custom shell scripts to run during the kernels boot process (they are called from the init script).I was wondering if there's any way to assign a variable that can be accessed between different scripts.For example my first script checks which type of pc i am installing on and assigns the hard drive location to a variable.HARDDRIVE = "/dev/sda1"at the end of the script it calls another script. In this script I cant reference HARDDRIVE as it is blank, to get around this I need to repeat the same code for assigning it.Its more of a space/aesthetics issue but I figured someone might know the solution off the top of their head

View 1 Replies View Related

General :: Exporting Environment Variables In Ubuntu?

Jun 2, 2010

I know many people have asked about environment variables before, but I am having a hard time dealing with these paths while ensuring I don't mess around with the original settings. How would you go about executing these commands in Ubuntu in terms of environment variables?

put /home/stanley/Downloads/ns-allinone-2.34/bin:/home/stanley/Downloads ns-allinone-2.34/tcl8.4.18/unix:/home/stanley/Downloads/ns-allinone-2.34/tk8.4.18/unixinto your PATH environment; so that you'll be able to run itm/tclsh wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put
/home/stanley/Downloads/ns-allinone-2.34/otcl-1.13,
/home/stanley/Downloads/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.

[Code]....

View 1 Replies View Related

General :: Join 2 Variables In A Bash Script?

Aug 12, 2011

I have $db and $DATE set in my bash script, then I need to join them like this: mysqldump --user=usr --password=pss --databases $db | gzip > /backups/sqlNew/$db_$DATE.sql.gz;

Unfortunately, that doesn't work. How do I properly join those 2 variables into a filename?

View 1 Replies View Related

General :: Cwrsync - How To Handle %userprofile% Variables

Jun 7, 2010

cwrsync is a great tool for synching "My Documents" to a network drive in Windows. However it uses a portion of cygwin to do this which uses forward slashes instead of back slashes. So, a manually typed command like the following works great: rsync -r --delete --exclude "My Pictures" "/cygdrive/c/Documents and Settings/demo/My Documents/" /cygdrive/j

However, you cannot put a variable like %userprofile% in this as it comes out like this (and is unrecognized): rsync: change_dir "/cygdrive/C:Documents and Settingsdemo/My Documents" failed: No such file or directory (2)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved