General :: Make An Environmental Variable RPMS?

Apr 1, 2011

I'm trying to make an environmental variable RPMS that will resolve to a website. I know I have to make the changes in .bash_profile, but all the things I try don't seem to want to work.

I've tried:
PATH=$RPMS:ftp://rha-server/pub/os/rhel5/Server/
or simply just making the variable itself
$RPMS=ftp://rha-server/pub/os/rhel5/Server/

The second one made a variable just fine, but when I attempted to run this command:

rpm -ihv $RPMS/caching-nameserver*

View 5 Replies


ADVERTISEMENT

General :: Environmental Variable In Bash Command String?

Feb 9, 2011

I do this:

Code:

a@b:~$ export A=hi
a@b:~$ echo $A
hi
a@b:~$ bash -c "export A=blah; echo $A"
hi
a@b:~$

Why doesn't the bash command print the new value of $A? Is there a way to make it do so?

View 6 Replies View Related

General :: Installed Qt Libs - Set Environmental Variable PATH

Sep 5, 2010

I have bash. I installed Qt libs and want to set environmental variable PATH, I tried some stuff from qt tutorials..

Here is what i tried:

Code:

and it does nothing so i tried

Code:

then checked path

Code:

Now there are two issues
1) the make gives error that header not found( probably make don't have the path)

2) when i closed the terminal and opened it again the PATH I newly entered was not there !

View 3 Replies View Related

General :: Ubuntu Etc/profile: Environmental Variable Doesn't Display Content?

Jul 28, 2011

i am trying to declare an environmental variable in the /etc/profile' (as per the tutorial i'm following) but when i declare it and do an echo i get nothing.Here's what i've done so far..nside /etc/profile:

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ -d /etc/profile.d ]; then

[code]...

View 12 Replies View Related

Ubuntu :: Where Is Environmental Variable Set / How Can I Get This Working?

Mar 19, 2011

I created some new accounts on a dev seat: Code: useradd -m newUser1.Users get created fine and can log in but are missing all the bash files (.bashrc, .bash_history, etc). When these users try to use the up and down arrows to view shell history they get junk characters. I checked and there is no history file in their homes. Where is the environmental variable set and how can I get this working?

View 1 Replies View Related

Programming :: Put A Name Which Contains Blank Into A Environmental Variable When Using Puten

Mar 28, 2011

Code:
/*[workhard@localhost BeginningLinuxProgrammingC3]$ echo new_value 1122
new_value 1122

It's ok when I add value"1122" to a new value. But how can I add value "11 22" to a new value.

#include <stdio.h>
#include<string.h>
#include <stdlib.h>
int main (int argc, char **argv)

[Code]....

View 2 Replies View Related

Ubuntu :: Unable To Set Environmental Variable (PATH) From Script

Jan 21, 2011

I am Just trying to set the Environmental variable using a script file and my code is as follows:

#!/bin/bash
echo $PATH
PATH=${PATH}:/opt/bin
export PATH
echo Environmental Variable path is Set
echo $PATH

When I am running the above script, from the last line "echo $PATH" I am getting that /opt/bin has been appended to the PATH but again when I am typing echo $PATH in the terminal I am not getting the newly appended path.

View 3 Replies View Related

Programming :: Make A New Variable With The String From The Old Variable Btut Without Any Plus Sign?

Apr 7, 2010

my script has a variable which comes in the form +00.00 +0.00 -00.00 or -0.00 (the numbers can be any in that form) for any that have a + symbol I need to remove the +, but if it has a - symbol it needs to stay.

i need to make a new variable with the string from the old variable btut without any plus sign. I have tried a lot of different ways with no success, each thing I tried either left the + or removed the entire string. I think this should work but doesn't

foo=+12.40
bar=${foo#+}

View 4 Replies View Related

General :: Make A Variable = Filename Without The Extension?

Apr 23, 2011

I am trying to strip the .wav file extension from a file name so that I can pass the result to lame encoder. I started to write a BASH script that looks like this:

Code:

for f in /home/user/wavfiles*; do FILE=basename $f .wav; lame $FILE; done

It doesn't work very well though. For the life of me I can't seem to discover how to use basename in a suitable way for a script like this.

View 8 Replies View Related

General :: Make A Variable Defined Outside A Script Identified Inside It?

Feb 8, 2011

i am runing the below script

foo..
if [ "$type" == "ok" ]
then string=ZZZZ:I=$number
elif [ "$type" == "NOK" ]

[code]....

the code inside sc2.sh needs to read the input from the variable (string) above. is there any way to make this variable recognized inside the sc2.sh

View 3 Replies View Related

General :: Bash Read All Environmental Variables Set By Other Shells?

Jul 23, 2010

For example, if I'm in csh, I can use `setenv VARNAME varVALUE` while I can use export in Bash. Given that the environmental variables are created, can BASH read env vars from csh and vice versa?

View 2 Replies View Related

General :: Assign Local Variable Values To Global Variable?

Feb 17, 2011

how to assign a local variable value to a global variable....

View 2 Replies View Related

General :: Create An Environment Variable With The PRINTER Variable?

Apr 16, 2011

I am supposed to create an environment variable with the PRINTER variable, which should resolve to the word sales. Would the command be like this?: env PRINTER - NAME=SALES (is this the command to create that variable with resolving the word sales to it?)

View 3 Replies View Related

OpenSUSE :: How I Can Make Variable Names Out Of String

Jul 13, 2011

I am bad with bash programming and I need some help how I can make variable names out of a string.I will need some help start doing that. And I think the first would be to get part of the filenames strings into variables.

View 7 Replies View Related

Ubuntu :: How To Make Variable And Read From Second Terminal

Apr 27, 2011

I have two terminals open and I want to save the current path in a variable and read it from the second terminal that I have open.

Then in the first terminal I type:
Code:
A=$(pwd)
And in the second I type:
Code:
echo $A
that doesn't work though.

I have tried also with
Code:
export A=$(pwd)
and
Code:
alias A=$(pwd)
but nothing seems to work. Is there a way to do this?

View 4 Replies View Related

Programming :: Make Bash Replace The Value Of A Variable?

Apr 18, 2009

I have a program I am writing where I have a for loop and I want to make it substitute the variable twice like:

for ((i=0;i<5;i++)) do
echo $"$i"
done

[code]...

View 3 Replies View Related

Programming :: Make Variable To Refer A File In A Folder?

Dec 16, 2008

How can i make a variable in a bash script, to refer each file in a folder,and to switch it to the next file,until the last file of the folder?

View 2 Replies View Related

Programming :: Make Radiolist Dialog Which Content So Many Options What Is The Value Of The Variable?

Dec 14, 2010

How can I make radiolist dialog which content so many options what is the value of the variable?Quote:

echo "How many options?"
read=VAR
dialog --title "sdf" --backtitle "sdff" --radiolist "ffdsfsd" 15 60 5 "1" "first" on "2" "second" off "3" "third" off "4" "fourth" off etc..

I must explode dialog in loop and add options? or something like that?

View 2 Replies View Related

General :: Use The Value Of One Variable To Generate A Name For Another Variable?

Jul 25, 2010

can i use the value of one variable to generate a name for another variable? for example i want to use the counter from a "do while" loop to name and define a variable each time the loop executes. for example

objectnames1=`ls -a`
objectnames2=`ls -a`
etc.

i don't have a script yet but each time through the loop i intend to cd to a particular directory and then define a variable containing a list of each object in that directory as values. for the rest of the script to work, each variable generated has to be unique, and i can't think of a good way to accomplish this.

if using a value from one variable to name another isn't possible, can anyone think of a more elegant solution? i know limited syntax but i'm willing to read up...

View 6 Replies View Related

General :: Sed Substitution Of Variable With A Variable?

Dec 27, 2010

I am trying to alter the character position of residue numbers above 999 in a pdb file.The following script is an attempt to:1) Get all unique pdb residue numbers (in column 5) using awk and assign it to a variable i.2) Loop through all the values in $i and if it is greater than 999, shift that number one character to the right using sed.However, the script only manages to alter the final residue numberCould anyone please advise how I can loop through all values in $i and shift it one character to the right?

#!/bin/bash
# Script to alter position of residue number in pdb file for resid above 999
i=$(awk '{print $5}' wt-test.pdb | uniq)

[code]...

View 6 Replies View Related

General :: Possible To Install RPMs In Qemu?

Aug 28, 2010

Can we install packacges/rpms for example in qemu?

View 2 Replies View Related

General :: Rpm Needs To Install First In A List Of RPMS?

Jan 24, 2011

I have a custom made rpm. I need to install my particular RPM in a list of rpms which are part of a program. Say I have around 20 patch rpms which needs to be installed I need to install this through yum command. My particular RPM namely Patch-list.1.1.1.2-1.noarch.rpm needs to be installed as the first rpm in the total list of 21 rpms. I can modify my spec files and Makefiles as per my wish. what needs to be changed so that my rpm Patch-list.1.1.1.2-1.noarch.rpm will be installed first.

View 2 Replies View Related

General :: Finding Rpms For Red Hat 8 Kernel Ver. 2.4.18-14?

Feb 24, 2010

I need to set up auditing on an old RHL 8.0 server running kernel version 2.4.18-14 but I can't seem to find an archive with the rpm for that version of Red Hat.

View 1 Replies View Related

General :: Downgrade And Remove Rpms In The Same Command?

Mar 22, 2011

I have a problem where in order to satisfy RPM dependencies, I need to remove packages and downgrade them in the same command. Imagine the following situation Before

A v2.0 depends on B,C
B v2.0 depends on C > 1.0
C v1.1

After

A v1.0 depends on C
C v 1.0

If I issue a

$ rpm -Uvh --oldpackage Av1.0.rpm Cv1.0.rpm

it will fail with "B depends on C > 1.0" If I issue a

$ rpm -e B

it will fail with "A requires B" so I appear to be in a catch-22. The obvious solution is to use a "--nodeps" and remove B before doing the downgrade, but I am creating these commands programmatically so I was hoping to use dependency resolution as a sanity check against an incorrect script. Is there any way to perform this downgrade without breaking the RPM dependency sanity checks by force?

View 2 Replies View Related

General :: Downloading Source RPMs - Fedora SRC

Apr 19, 2011

Using yum installs the binary version of the software. Is it possible to use yum to download the src rpms , because i have seen one repo called Fedora src. I am using Fedora 11.

View 5 Replies View Related

General :: How To Install CentOS With Lesser RPMs?

Jan 30, 2010

I have been challenged to install CentOS occupying just 200 MB. As for now, I installed the OS with only first CD.

Just put :

@core

under %package directive in ks.cfg. I can see the space as of now is:

Code:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 13G 740M 12G 9% /
/dev/sda1 99M 12M 83M 12% /boot
tmpfs 125M 0 125M 0% /dev/shm

I need to make it to atleast 300MB.I can see those RPM lying in Linux Box:

Code:

df -hyum remove 389*df -hyum remove *ldap*df -hrpm -qa --qf '%11{SIZE} %{NAME}
' | sort -k1n
0 basesystem
0 filesystem

[code]...

I will remove java, selinux-* but what other package I can remove.

Note: I dont need any application to run but just bare OS.

View 1 Replies View Related

General :: Building RPMs From Compiled Source?

Jan 13, 2011

I already have compiled the source and I want to make an rpm. What do i do with it? Can i utilize the make file?

View 1 Replies View Related

General :: Use A Dbms To Store Rpms Instead Of File System?

Jan 5, 2010

Im trying to use a DBMS to store rpms for been reach by YUM, what I need to know is how to generate the repomd.xml and make it point to my dbms using href like [URL]...

View 1 Replies View Related

General :: Shell Script To Check If Rpms Is Installed Or Not?

May 1, 2010

i have a input text file contain 10 rpms and they are old versions i need a shell script to check if these rpms is installed or not and if the newer version is installed and i need all the results in one output text file contain every rpm and its condition ( the same) or (new )or( not installed)

View 3 Replies View Related

General :: Why Does RHEL Server Contain Rpms For Both The I386 And X86_64 Platforms

Feb 25, 2010

For RHEL 5.4,
# uname -r
2.6.18-164.11.1.el5
# uname -m

[code].....

show some "duplicate" rpms, one for the i386 and one for the x86_64 platform?

For example,

aspell-0.60.3-7.1.i386
aspell-0.60.3-7.1.x86_64

There are numerous other "dups" like that. Is this normal?

View 1 Replies View Related







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