Sponsored Content
Full Discussion: new scripter
Top Forums Shell Programming and Scripting new scripter Post 302137674 by blowtorch on Wednesday 26th of September 2007 09:12:02 AM
Old 09-26-2007
Try this:
Code:
$PRODUCT=$1

CONFIG=./etc/${PRODUCT}_config.xml

print Using $CONFIG

The shell is interpreting PRODUCT_config as the variable name rather than PRODUCT, because _ is allowed to be part of variable name.
 

We Also Found This Discussion For You

1. Shell Programming and Scripting

Begining Shell scripter

I am trying to write for my class project a shell script, using bourne shell, that will take one command, either -l or -w. If -l is entered then the script should output the names of all the files in my working directory sorted in increasing order of the number of lines in the file. If -w is input... (2 Replies)
Discussion started by: C.Ronaldo-7-
2 Replies
times(1)                                                           User Commands                                                          times(1)

NAME
times - shell built-in function to report time usages of the current shell SYNOPSIS
sh times ksh times DESCRIPTION
sh Print the accumulated user and system times for processes run from the shell. ksh Print the accumulated user and system times for the shell and for processes run from the shell. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ksh(1), sh(1), time(1), attributes(5) SunOS 5.10 15 Apr 1994 times(1)
All times are GMT -4. The time now is 04:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy