Sponsored Content
Top Forums Shell Programming and Scripting How to use variable with command substitution in variable Post 302445561 by zaxxon on Monday 16th of August 2010 08:50:54 AM
Old 08-16-2010
How did you define the variable?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed variable substitution when variable constructed of a directory path

Hello, i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem. my var1 is a string constructed like this: filename1 filerev1 filepath1 my var2 is another string constructed like this: filename2 filerev2 filepath2 when i do... (2 Replies)
Discussion started by: alrinno
2 Replies

2. Shell Programming and Scripting

variable substitution

file1.ksh #!/bin/ksh test5_create="I am a man" # test5 will be dynamic and the value will be passed from command line a=${1}_create echo $a # i need the output as "I am a man" ./file1.ksh test5 # i run the script like this any suggessions guys... (1 Reply)
Discussion started by: giri_luck
1 Replies

3. Shell Programming and Scripting

Insert a line including Variable & Carriage Return / sed command as Variable

I want to instert Category:XXXXX into the 2. line something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong: sed "2i\\${n}Category:$cat\n" Sample: Titel Blahh Blahh abllk sdhsd sjdhf Blahh Blah Blahh Blahh Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies

4. UNIX for Dummies Questions & Answers

sed insert command and variable expansion/command substitution

I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename? #!/bin/bash filename=`echo $0` /usr/bin/sed '/#include/ { i\ the filename is `$filename` }' $1 exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies

5. Shell Programming and Scripting

Making script show command (e.g. copy) being executed and variable substitution?

When script is running you only see when some of the commands are not successfull. Is there a way to see which command are executed and to show the substitution of variables as every line is executed ? (3 Replies)
Discussion started by: gr0124
3 Replies

6. Shell Programming and Scripting

Not able to store command inside a shell variable, and run the variable

Hi, I am trying to do the following thing var='date' $var Above command substitutes date for and in turn runs the date command and i am getting the todays date value. I am trying to do the same thing as following, but facing some problems, unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies

7. Shell Programming and Scripting

[Solved] Command Substitution and Variable Expansion within a Case

Hello All, I don't write scripts very often, and in this case I am stumped, although it may be a bug in the version of bash I have to use (it's not my system). I want to extract a specific string snippet from a block of text (coming from a log file) that is dependent on a bunch of other... (1 Reply)
Discussion started by: jaimielives
1 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

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
Deprecated names(3)						      BrlAPI						       Deprecated names(3)

NAME
Deprecated names - Data Structures struct brlapi_writeStruct Macros #define brlapi_settings_t brlapi_connectionSettings_t #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER #define brl_keycode_t brlapi_keyCode_t #define brl_type_t brlapi_packetType_t #define BRLCOMMANDS NULL #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX #define brlapi_initializeConnection brlapi_openConnection #define brlapi_getTty brlapi_enterTtyMode #define brlapi_getTtyPath brlapi_enterTtyModeWithPath #define brlapi_leaveTty brlapi_leaveTtyMode #define brlapi_unignoreKeyRange brlapi_acceptKeyRange #define brlapi_unignoreKeySet brlapi_acceptKeySet #define brlapi_getRaw brlapi_enterRawMode #define brlapi_leaveRaw brlapi_leaveRawMode #define brlapi_suspend brlapi_suspendDriver #define brlapi_resume brlapi_resumeDriver #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION #define BRLERR_EOF BRLAPI_ERROR_EOF #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR Detailed Description With version 0.5.0, BrlAPI is now provided through including <brlapi.h> and got a big renaming pass. Old names are still available through macros, but they are deprecated since they will get dropped in the next release. This documentation is for you to know the new names. For checking that you have completely switched to new names, just define BRLAPI_NO_DEPRECATED: that will disable compatibility macros. Macro Definition Documentation #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX #define brl_keycode_t brlapi_keyCode_t #define brl_type_t brlapi_packetType_t #define brlapi_getRaw brlapi_enterRawMode #define brlapi_getTty brlapi_enterTtyMode #define brlapi_getTtyPath brlapi_enterTtyModeWithPath #define brlapi_initializeConnection brlapi_openConnection #define brlapi_leaveRaw brlapi_leaveRawMode #define brlapi_leaveTty brlapi_leaveTtyMode #define brlapi_resume brlapi_resumeDriver #define brlapi_settings_t brlapi_connectionSettings_t #define brlapi_suspend brlapi_suspendDriver #define brlapi_unignoreKeyRange brlapi_acceptKeyRange #define brlapi_unignoreKeySet brlapi_acceptKeySet #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER #define BRLCOMMANDS NULL #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY #define BRLERR_EOF BRLAPI_ERROR_EOF #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY Author Generated automatically by Doxygen for BrlAPI from the source code. Version 1.0 Fri Jun 7 2013 Deprecated names(3)
All times are GMT -4. The time now is 01:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy