Sponsored Content
Full Discussion: Replacing $ in variable
Top Forums UNIX for Dummies Questions & Answers Replacing $ in variable Post 302171669 by sank on Friday 29th of February 2008 06:59:10 AM
Old 02-29-2008
probably the variable k is not formed correctly. Can you try echo $k and see if you get $DESTDIR/$PKG/$VERSION ? Are you forming the variable k like this : k="\$DESTDIR/\$PKG/\$VERSION" ? if so, the sed command works as expected.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing pattern in variable

My String variable is holding value as - abc"def I want to replce " with \" I tried with awk : echo $var | awk '{gsub(/"/,"\"");print}' and I am getting an error, `)' is not expected. (1 Reply)
Discussion started by: videsh77
1 Replies

2. Shell Programming and Scripting

Replacing set of characters with a value of a variable

I need to replace anything immediately after the pattern "standard01/" in a file with the value of a variable I don't know the length of the characters stored in that variable. - that might vary. I know there is some string after the pattern "standard01/", i don't know the what the string is or... (1 Reply)
Discussion started by: prekida
1 Replies

3. Shell Programming and Scripting

Help in replacing text with the value of a variable

Input file - tmp <begin> ./00003/ ./00004/ <end> I would like to replace "." with the value of pwd so that the output will look like /dev/project/00003/ t=`pwd` sed -e "s/\./$t/g" tmp > tmp1; The above piece of code is not working. Appreciate your help. (4 Replies)
Discussion started by: lotto_123
4 Replies

4. Shell Programming and Scripting

Replacing a pattern using variable?

ip1="xxx" ip2="bbb" sed 's/$ip1/$ip2/g' (3 Replies)
Discussion started by: shivarajM
3 Replies

5. UNIX for Dummies Questions & Answers

Replacing in a variable

Hi, If I have a variable var1 ='TH 12/1234' How can I set this too in a script var1 ='TH 12~1234' Bearing in mind "/" might be in a difference place each time and that the "/" might not even exist each time the variable is set. Thanks (3 Replies)
Discussion started by: belfastbelle
3 Replies

6. Shell Programming and Scripting

replacing line with variable

All I want to do is replace the 2nd line in a file with a variable, eg, var=xxx the file 'test' containing: aaa bbb ccc replace bbb with xxx aaa xxx ccc I had it working with sed on a redhat machine, but it doesn't work on a mac machine. (4 Replies)
Discussion started by: sideways
4 Replies

7. Shell Programming and Scripting

replacing ' ' and :'s with _'s in a variable

Hi guys In my shell script I have a variable that contains a string that contains the current time. I want to replace the spaces and colons in the value with underscores. TIME=`date` echo $TIME gives me: Thu Sep 24 16:40:53 BST 2009 I want it to show:... (4 Replies)
Discussion started by: alinaqvi90
4 Replies

8. Shell Programming and Scripting

replacing date with a variable in a file

Hi, I've a variable for example.. ACTIVATION_DATE=2010-11-11 (the date above is a result of a sql query and not hardcoded) now there is another file (test_2.parm) where there are many variables predefined.. REG_CODE=111 ACT_DATE=2010-10-10 CAN_DATE=8888-31-12 Now I want to search for... (1 Reply)
Discussion started by: RRVARMA
1 Replies

9. Shell Programming and Scripting

passing variable to another file and replacing

Hi all, I have a script in file1 which gets input from the user say variable "TYPE". This variable is present in the other file2. I want to replace the variable in the file2 with the value given by the user and print the file. How can I achieve this task? file1 code echo "Give... (3 Replies)
Discussion started by: Ananthdoss
3 Replies

10. Shell Programming and Scripting

Replacing a variable in a loop

input.txt I want to make 3 seprate ouputs such that toast1.txt ICH.txt ICH_SV.txt I have tried "echo" and "sed 's/k/toast1/g' to replace k, but its not quite working. Please help me out :) Thanks! (4 Replies)
Discussion started by: johnkim0806
4 Replies
GPT-PKG(8)						User Contributed Perl Documentation						GPT-PKG(8)

NAME
gpt-pkg - Creates flavored binary packages out of an installation SYNOPSIS
gpt-pkg [options] packages Options: -verbose Print copious output -help Print usage -man Print man page. -version Print GPT version. -native Create native pkgs as well as GPT pkgs (RPMs only). -all Archive everything in the package directory.. -installdir=PATH Override $GLOBUS_LOCATION -pkgdir=PATH Directory to put the packages -rpmprefix=PATH Absolute path encoded in the RPM. -buildnumber=NUMBER Build number used for pgm_static packages -rpmlicense=LABEL License Label added to the RPM header [packages] List of packages to be archived DESCRIPTION
gpt-pkg Creates binary packages from an installation. The installation needs to contain GPT packaging data files. An installation is created by running gpt-build on a collection of source packages or bundles. FILES IN PGM PACKAGES
Installed files such as executables that are found in pgm and ptm_static packages will overwrite one another when multiple flavors of the same package are built by gpt-build. To preserve multiple flavors of these files, gpt-build copies them into flavored subdirectories. For example, the program $GLOBUS_LOCATION/bin/foo will be copied into the location $GLOBUS_LOCATION/bin/gcc32/shared if it was built with dynamically with the gcc32 flavor. gpt-pkg retrieves these files and copies them back to their proper location before packaging them. Thus gpt-pkg will also overwrite these files as it archives the different flavors of a pgm package. OPTIONS
-installdir Specify the directory in which the installed files currently live. If this argument is not supplied, the value of the environment variable GLOBUS_LOCATION is used instead. -all Packages all of the binaries in an installation. -native Creates a package in the native packaging format. Currently only rpm is supported. -rpmprefix=<path_to_installation> This should be set to the path to your GLOBUS_LOCATION. GPT will use a value of "/usr/grid" if this option is not specified. -rpmlicense=<label> Provides an alternate copyright label for the rpms. The default is whatever GPT was configured with. -verbose Prints out all of the build messages. -log=FILE Appends all of the build messages to FILE. This option also sets -verbose. -help Print a brief help message and exits. -man Prints the manual page and exits. -version Prints the version of GPT and exits. pgm and pgm_static packages gpt-build copies the files for these packages in a flavored location because different flavors of these types of packages will conflict with each other. gpt-pkg restores these files when it packages pgm and pgm_static types. SEE ALSO
gpt-bundle(8) gpt-install(8) gpt-build(8) AUTHOR
Michael Bletzinger <mbletzin.ncsa.uiuc.edu> and Eric Blau <blau.mcs.anl.gov> perl v5.14.2 2012-04-30 GPT-PKG(8)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy