10-24-2008
Quote:
Originally Posted by
sreedivia
Thanks for your reply.
How can i assign a value to this variable
${variable}_${i}="somestring" is it work?
The way to learn scripting/programming or whatever is to do it yourself, just try it out......
Regards
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi ,
like to ask if we use ksh script to take in parameter into $1
and how do i concatenate the $1 value with some words into a variable?? Below is what i have written and i think is wrong ,how do i write it?
datafile="Report" || $1 || ".xls" (Should become Report2000.xls)
echo... (3 Replies)
Discussion started by: blueberry80
3 Replies
2. Shell Programming and Scripting
I want to concatenate any particular field of the file with any String say SSB....but i am not able to do it...
I hv tried the following code....but its saying there is error in parsing it..
awk 'BEGIN { FS = "," ; OFS = "," ; } { for ( i = 1 ; i < 5 ; i++ ) {a=i;b="SSB"; print $1,$a$b,$3 } }'... (3 Replies)
Discussion started by: monu_munish
3 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
How to concatenate a string to a variable in a script
I'm having a file which is consisting of data and i need to extract the first line of the file and append it to a string.
/tmp/samp.list containg 60000
I like to concatenate it with a string (SS_)
grep -w SS_$(head -1... (1 Reply)
Discussion started by: nkamalkishore
1 Replies
4. Shell Programming and Scripting
Hello,
It might be stupid question But I will ask it any way:)
var1="1 2 3 4"
var2="5 6 7 8"
var3=$var1\ $var2
var4="$var1\n$var2"
echo "$var1"
echo "$var2"
echo "$var3"
echo "$var4"
The result of executing this code is as follow
1 2 3 4
5 6 7 8
1 2 3 4 5 6 7 8
1 2 3 4\n5 6... (12 Replies)
Discussion started by: fdc2suxs
12 Replies
5. Shell Programming and Scripting
I have a file with
<suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux">
Need to find word "build" then
extract build number, which is 19921 also
release number, which is 6.1.5 then
concatenate them to one variable as... (6 Replies)
Discussion started by: garg
6 Replies
6. Programming
Hi
mY files paths are defined as :
//sbase = 'D:\data\sample_AMC\fasta_files\';
sbase2 = 'D:\data\sample_AMC\fasta_files\results\';
snameprefix = 'orig_ind';
snameprefix3 = 'results_ind';
...
const string filname = sbase + snameprefix + snamesuffix;
const string resultsname_ =... (2 Replies)
Discussion started by: siya@
2 Replies
7. Shell Programming and Scripting
I have the path name in a Variable
Ex:
$XML_PATH_FLAG = /ebs/appl/u00/universe01/inbound/universeorders
Now I have to pick up ALL XML files in this directory . In other words
I have to pick up ALL the files
/ebs/appl/u00/universe01/inbound/universeorders/F1.xml... (2 Replies)
Discussion started by: Pete.kriya
2 Replies
8. Shell Programming and Scripting
Hi Guys,
I was scratching my head for this for half a day... finally not successful :confused:
Following is the problem
I have a variable
$ var1=123
$ var2-234
$ var3=345
and another Variable
$ i=1
Now i wanted to save these into a Variable as shown below
for i in 1 2 3
do... (5 Replies)
Discussion started by: ramprabhum
5 Replies
9. Shell Programming and Scripting
Hello,
I am trying to concatenate a string in a bash script like this:
runCmd="docker run -e \"IMAGE_NAME=$IMAGE_NAME\" "
env | grep "$ENV_SUFFIX" | while read line; do
envCmd="-e \"${line}\" "
runCmd=$runCmd$envCmd
echo $runCmd # here concatenation works fine
done
echo... (3 Replies)
Discussion started by: czabak
3 Replies
10. UNIX for Beginners Questions & Answers
I have below code inside my awk script
if ( $0 ~ /SVC IN:/ )
{
svc_in=substr( $0,23 , 3);
if (msg_start == 1 && msg_end == 0)
{
msg_arr=$0;
}
}
else if ( $0 ~ /^SVC OUT:/ )
{
svc_out=substr( $0, 9, 3);
if (msg_start == 1 && msg_end == 0)
... (6 Replies)
Discussion started by: bhagya123
6 Replies
shell(1F) FMLI Commands shell(1F)
NAME
shell - run a command using shell
SYNOPSIS
shell command [command] ...
DESCRIPTION
The shell function concatenate its arguments, separating each by a space, and passes this string to the shell ($SHELL if set, otherwise
/usr/bin/sh).
EXAMPLES
Example 1: A sample output of shell command.
Since the Form and Menu Language does not directly support background processing, the shell function can be used instead.
`shell "build prog > /dev/null &"`
If you want the user to continue to be able to interact with the application while the background job is running, the output of an exe-
cutable run by shell in the background must be redirected: to a file if you want to save the output, or to /dev/null if you don't want to
save it (or if there is no output), otherwise your application may appear to be hung until the background job finishes processing.
shell can also be used to execute a command that has the same name as an FMLI built-in function.
NOTES
The arguments to shell will be concatenate using spaces, which may or may not do what is expected. The variables set in local environments
will not be expanded by the shell because "local" means "local to the current process."
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
sh(1), attributes(5)
SunOS 5.10 5 Jul 1990 shell(1F)