Sponsored Content
Top Forums Shell Programming and Scripting Using Sed to do a substitution inside ksh Post 302565373 by Calbrenar on Monday 17th of October 2011 04:54:33 PM
Old 10-17-2011
well that was painless. I thought you needed the ` to run a command. Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh substitution

Hello, I thought it was possible to use several time a #! entry on a script but it doesn't seems to work. My need is to have a part of a ksh script without substitution so it would look like #!/bin/ksh -- first part --- #!/bin/ksh -f -- part without substitution -- #!/bin/ksh --... (2 Replies)
Discussion started by: solea
2 Replies

2. Shell Programming and Scripting

KSH variable substitution

Hi folks Please let me know if anyone knows how to handle this. My KSH script -> testscript.ksh cmd=$1 ENV="devl" echo $cmd This is how I call the script ./testscript.ksh 'ps -ef | grep br$ENV' How do I get this to print the below text i.e $ENV should be substituted with the value... (5 Replies)
Discussion started by: tipsy
5 Replies

3. Solaris

Substitution not working in ksh

Hi, Following code is working in bash but not in ksh. Can someone please send me an alternative? #!/bin/ksh fname="EOA.dmp" echo $fname logname=${fname/.dmp/.log} echo $logname I am getting below error in ksh "testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution... (3 Replies)
Discussion started by: arsheshadri
3 Replies

4. Shell Programming and Scripting

String substitution on find results inside exec/xargs

What I'm trying to do is perform a copy, well a ditto actually, on the results of a find command, but some inline string substitution needs to happen. So if I run this code find ./ -name "*.tif" I get back these results. .//1234567.tif .//abcdefg.tif Now the action from exec or xargs I... (2 Replies)
Discussion started by: myndcraft
2 Replies

5. Shell Programming and Scripting

variable substitution in ksh

Hi I have a variable BIT1 which holds some value. Is there a way to retrieve the value of this variable indirectly via another variable, lets say SUBSET_BIT_NUM=1, so the call will look something like this: sundev1 $ echo ${BIT${SUBSET_BIT_NUM}} ksh: ${BIT${SUBSET_BIT_NUM}}: bad substitution ... (3 Replies)
Discussion started by: aoussenko
3 Replies

6. Shell Programming and Scripting

KSH: substitution character, AWK or SED?

Hi Gurus, I am working with a korn shell script. I should replace in a very great file the character ";" with a space. Example: 2750;~ 2734;~ 2778;~ 2751;~ 2751;~ 2752;~ what the fastest method is? Sed? Awk? Speed is dead main point, Seen the dimensions of the files Thanks (6 Replies)
Discussion started by: GERMANICO
6 Replies

7. Shell Programming and Scripting

Using commands inside sed substitution

Dear Friends, Please let me know how to use the date command inside the substitution flag replacement string. echo "01 Jan 2003:11:00:06 +0100" | sed 's/\(.*\)/`date -d \1 "+%Y%m%d%H%M%S"`/' I want to supply \1 string to Here mention below as part of replacement string, date -d <Here>... (5 Replies)
Discussion started by: tamil.pamaran
5 Replies

8. UNIX for Dummies Questions & Answers

Variable inside command substitution

Hello people. Part of my script: SUBSETID=`echo $PMFILE |sed 's/pmresult_//' | sed 's/_*//'` MAPFILE=`find /huawei/cell /huawei/nodeb /huawei/rnc -name 'mapping_$SUBSETID.txt' |grep -v backup` Unfortunatelly variable $SUBSETID in the MAPFILE declaration will not return the... (3 Replies)
Discussion started by: drbiloukos
3 Replies

9. Shell Programming and Scripting

Command substitution inside of a variable expression (AIX, KORN)

Hello all. This is my first post/question on this site. I’m a new Systems Analyst with previous experience with BASH. Although now I'm using AIX, and I’m trying to get a feel for the Korn shell (for those of you that don’t know AIX only uses the KORN shell). I hope I put this into the correct... (10 Replies)
Discussion started by: sydox
10 Replies

10. Shell Programming and Scripting

sed command not working inside ksh script but works fine outside

Hi, I am a bit confused ,why would a sed command work fine outside of ksh script but not inside. e.g I want to replace all the characters which end with a value and have space at end of it. so my command for it is : sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
DH-AUTORECONF(7)						   dh-autoreconf						  DH-AUTORECONF(7)

NAME
dh-autoreconf - debhelper add-on to run autoreconf during build DESCRIPTION
The dh-autoreconf package provides a sequence addon for debhelper 7 which can be used in the following way: #!/usr/bin/make -f %: dh $@ --with autoreconf This will call dh_autoreconf prior to dh_auto_configure and will call dh_autoreconf_clean before dh_clean. For more information on how to control the autoreconf process or how to other possible options, read the dh_autoreconf(1) and dh_autoreconf_clean(1) manual pages. CDBS INTEGRATION
This package also provides /usr/share/cdbs/1/rules/autoreconf.mk for packages using CDBS. The variable "DEB_DH_AUTORECONF_ARGS" can be used to pass extra arguments to dh_autoreconf, and the variable "DEB_DH_AUTORECONF_CLEAN_ARGS" to pass arguments to dh_autoreconf_clean. See their manual pages for information on available arguments. TIPS AND EXAMPLES
PATCHING LTMAIN.SH FOR AS-NEEDED LINKER FLAGS You can add support for -Wl,--as-needed to ltmain.sh (at least for those ltmain.sh scripts changed during autoreconf) by passing the argument --as-needed to dh_autoreconf, as demonstrated in the following example: #!/usr/bin/make -f %: dh $@ --with autoreconf override_dh_autoreconf: dh_autoreconf --as-needed and for CDBS, by adding it to the correct variable such as: DEB_DH_AUTORECONF_ARGS = --as-needed For more information about this feature, see dh_autoreconf(1) RUNNING MULTIPLE COMMANDS WITH DH_AUTORECONF Please note that you may run dh_autoreconf only once. If you need to run multiple commands, you can put the commands into a script or your debian/rules file and then pass the name of your script to dh_autoreconf. For example, if your script is called debian/autogen.sh, you can put the following into your debian/rules if you use dh: override_dh_autoreconf: dh_autoreconf debian/autogen.sh Or, if you use CDBS: DEB_DH_AUTORECONF_ARGS += debian/autogen.sh CAVEATS
dh_autoreconf is a superset of the autotools-dev debhelper addons, so you do not need --with=autotools_dev if you use --with=autoreconf. In fact, in most cases they should not be used together, as it may lead to unpredictable behaviour. From time to time, there might be a short breakage for those using automatic ltmain.sh patching, when the patch now longer applies to the ltmain.sh. You can only run dh_autoreconf once. Future versions may be able to be run multiple times, but this requires slightly more planning. SEE ALSO
debhelper(7), dh(1), dh_autoreconf(1), dh_autoreconf_clean(1) AUTHOR
Julian Andres Klode <jak@debian.org> dh-autoreconf v7 2012-11-22 DH-AUTORECONF(7)
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy