Sponsored Content
Top Forums Shell Programming and Scripting namerefs alternative for KSH88 Post 302705941 by nitrobass24 on Tuesday 25th of September 2012 08:29:03 PM
Old 09-25-2012
Here is what i ended up with after doing some research on uses of eval.
Code:
i=1
BIGSTRING="one two three four five six seven eight"

while [[ $i -le 10 ]]; do 
typeset "STRING$i=`echo $BIGSTRING| cut -d' ' -f1-50`"
# typeset -n NEWVAR="STRING$i"
eval "NEWVAR=\$STRING$i"
do_stuff_here_w_NEWVAR
done

Quote:
Originally Posted by Scrutinizer
The standard approach would be to use eval, but that needs to be done carefully, since it could introduce security risks..

What OS and version are you using?
What do you mean security risk?
I am running on RHEL5 (KSH93) & HPUX, SOL5.10 (KSH88)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh88 - curses

I was wondering if there is anyway to use the curses library with ksh88. I saw Shell Curses function library which says I can use /usr/local/functions/shellcurses on ksh93 but I am on ksh88. I am on a HP-UX box. (0 Replies)
Discussion started by: IMTheNachoMan
0 Replies

2. Shell Programming and Scripting

ksh88 or ksh93

Hi all! Does anybody know how can I check if any UNIX installation has implemented ksh88 or ksh93? Thanks in advance. Néstor. (3 Replies)
Discussion started by: Nestor
3 Replies

3. Shell Programming and Scripting

Substring in ksh88 ?

Hello, ksh88 doesn't support ${var:x:y}. Any alternatives to get substring ? thanks Vilius (2 Replies)
Discussion started by: vilius
2 Replies

4. Shell Programming and Scripting

Download AT&T ksh88 ?

Hello, I need ksh88 for my linux system - and I don't want pdksh. Possible to get original ksh 88 binaries or source ? (I don't need ksh93 which is available) thanks Vilius (1 Reply)
Discussion started by: vilius
1 Replies

5. Shell Programming and Scripting

[ksh88 and awk] Number of fields with a value.

Hi, With: # VALUES="one~two~~~" # echo $VALUES | awk 'BEGIN {FS="~"} {print NF}' 5 I can determine the number of fields. How to determine the number of fields with a value ? In this case 2. Thanks in advance, ejdv (6 Replies)
Discussion started by: ejdv
6 Replies

6. Shell Programming and Scripting

Comparing Strings in ksh88

Hi I tried the following string comparison script in Ksh88 #!/bin/ksh str1='aC' str2='ABC' if then echo "Equal" else echo "Not Equal" fi Though str1 and str2 are not equal the script output says Equal . Please correct me Thanks (2 Replies)
Discussion started by: smile689
2 Replies

7. Shell Programming and Scripting

Zip size is different though files are same in ksh88

I'm using Ksh88 . I've last day files in one directory and current month files in another directory , having the same naming convention. Now i need to compare these folders size , if there is no change in these files then no action to be performed else if there is a change then i need to call... (1 Reply)
Discussion started by: smile689
1 Replies

8. Shell Programming and Scripting

FTP script in ksh88

Hi I tried the following code to FTP the files from test server to dev #!/bin/ksh DST=/home/files cd $DST ftp -inv 'test_serv101' << EOF quote USER test quote PASS test # File Path on test server cd /etc/home/Or_Files ascii mget curMonth* $DST quit EOF when i try the above code it... (4 Replies)
Discussion started by: smile689
4 Replies

9. Solaris

Solaris scripting problem with ksh88

Hello, I want to pick a random element from a list, and created these 2 lines, which work very well in ksh93. Unfortunately, I get this "bad substitution" message in ksh88. I'm wondering if there's an equivalent to the second line of my script.. or if I have to install ksh93 to make this... (8 Replies)
Discussion started by: gfroute
8 Replies

10. OS X (Apple)

FFT for the AMIGA through ksh88 shell.

I don't know if anyone is interested but I have been meddling with FFT for the AMIGA. (Sadly we AMIGAns don't have these luxuries through any scripting language. Below is a Python snippet that uses the builtin 'cmath' module to work with the lowly Python 2.0.1 for the AMIGA. It is part of a... (0 Replies)
Discussion started by: wisecracker
0 Replies
DRC(1)							      General Commands Manual							    DRC(1)

NAME
drc - a program for acoustic compensation of audio systems SYNOPSIS
drc [options] DRCFile DRCFile is name of DRC configration file DESCRIPTION
This manual page documents briefly the drc program. This manual page was written for the Debian distribution because the original program does not have a manual page. drc is program used to generate correction filters for acoustic compensation of HiFi and audio systems in general, including listening room compensation. Program generates just the FIR correction filters, which can be used with a real time or offline convolver to provide real time or offline correction. drc doesn't provide convolution features, and provides only some simplified, although really accurate, measuring tools. OPTIONS
--help Show the full options list --BCBaseDir <STRING> --BCInFile <STRING> --BCInFileType <STRING> --BCSampleRate <INTEGER> --BCImpulseCenterMode <STRING> --BCImpulseCenter <INTEGER> --BCInitWindow <INTEGER> --BCPreWindowLen <INTEGER> --BCPreWindowGap <INTEGER> --BCNormFactor <FLOAT> --BCNormType <STRING> --MCFilterType <STRING> --MCInterpolationType <STRING> --MCMultExponent <INTEGER> --MCFilterLen <INTEGER> --MCNumPoints <INTEGER> --MCPointsFile <STRING> --MCMagType <STRING> --MCFilterFile <STRING> --MCFilterFileType <STRING> --MCOutWindow <INTEGER> --MCNormFactor <FLOAT> --MCNormType <STRING> --MCOutFile <STRING> --MCOutFileType <STRING> --BCDLType <STRING> --BCDLMinGain <FLOAT> --BCDLStartFreq <FLOAT> --BCDLEndFreq <FLOAT> --BCDLStart <FLOAT> --BCDLMultExponent <INTEGER> --HDMultExponent <INTEGER> --HDMPNormFactor <FLOAT> --HDMPNormType <STRING> --HDMPOutFile <STRING> --HDMPOutFileType <STRING> --HDEPNormFactor <FLOAT> --HDEPNormType <STRING> --HDEPOutFile <STRING> --HDEPOutFileType <STRING> --MPPrefilterType <STRING> --MPPrefilterFctn <STRING> --MPWindowGap <INTEGER> --MPLowerWindow <INTEGER> --MPUpperWindow <INTEGER> --MPStartFreq <FLOAT> --MPEndFreq <FLOAT> --MPWindowExponent <FLOAT> --MPFilterLen <INTEGER> --MPFSharpness <FLOAT> --MPBandSplit <INTEGER> --MPHDRecover <STRING> --MPEPPreserve <STRING> --MPHDMultExponent <INTEGER> --MPPFFinalWindow <INTEGER> --MPPFNormFactor <FLOAT> --MPPFNormType <STRING> --MPPFOutFile <STRING> --MPPFOutFileType <STRING> --DLType <STRING> --DLMinGain <FLOAT> --DLStartFreq <FLOAT> --DLEndFreq <FLOAT> --DLStart <FLOAT> --DLMultExponent <INTEGER> --EPPrefilterType <STRING> --EPPrefilterFctn <STRING> --EPWindowGap <INTEGER> --EPLowerWindow <INTEGER> --EPUpperWindow <INTEGER> --EPStartFreq <FLOAT> --EPEndFreq <FLOAT> --EPWindowExponent <FLOAT> --EPFilterLen <INTEGER> --EPFSharpness <FLOAT> --EPBandSplit <INTEGER> --EPPFFlatGain <FLOAT> --EPPFOGainFactor <FLOAT> --EPPFFlatType <STRING> --EPPFFGMultExponent <INTEGER> --EPPFFinalWindow <INTEGER> --EPPFNormFactor <FLOAT> --EPPFNormType <STRING> --EPPFOutFile <STRING> --EPPFOutFileType <STRING> --PCOutWindow <INTEGER> --PCNormFactor <FLOAT> --PCNormType <STRING> --PCOutFile <STRING> --PCOutFileType <STRING> --ISType <STRING> --ISPETType <STRING> --ISPrefilterFctn <STRING> --ISPELowerWindow <INTEGER> --ISPEUpperWindow <INTEGER> --ISPEStartFreq <INTEGER> --ISPEEndFreq <INTEGER> --ISPEFilterLen <INTEGER> --ISPEFSharpness <FLOAT> --ISPEBandSplit <INTEGER> --ISPEWindowExponent <FLOAT> --ISPEOGainFactor <FLOAT> --ISSMPMultExponent <INTEGER> --ISOutWindow <INTEGER> --ISNormFactor <FLOAT> --ISNormType <STRING> --ISOutFile <STRING> --ISOutFileType <STRING> --PTType <STRING> --PTReferenceWindow <INTEGER> --PTDLType <STRING> --PTDLMinGain <FLOAT> --PTDLStart <FLOAT> --PTDLStartFreq <FLOAT> --PTDLEndFreq <FLOAT> --PTDLMultExponent <INTEGER> --PTBandWidth <FLOAT> --PTPeakDetectionStrength <FLOAT> --PTMultExponent <INTEGER> --PTFilterLen <INTEGER> --PTFilterFile <STRING> --PTFilterFileType <STRING> --PTNormFactor <FLOAT> --PTNormType <STRING> --PTOutFile <STRING> --PTOutFileType <STRING> --PTOutWindow <INTEGER> --PLType <STRING> --PLMaxGain <FLOAT> --PLStart <FLOAT> --PLStartFreq <FLOAT> --PLEndFreq <FLOAT> --PLMultExponent <INTEGER> --PLOutWindow <INTEGER> --PLNormFactor <FLOAT> --PLNormType <STRING> --PLOutFile <STRING> --PLOutFileType <STRING> --RTType <STRING> --RTPrefilterFctn <STRING> --RTWindowGap <INTEGER> --RTLowerWindow <INTEGER> --RTUpperWindow <INTEGER> --RTStartFreq <FLOAT> --RTEndFreq <FLOAT> --RTWindowExponent <FLOAT> --RTFilterLen <INTEGER> --RTFSharpness <FLOAT> --RTBandSplit <INTEGER> --RTOutWindow <INTEGER> --RTNormFactor <FLOAT> --RTNormType <STRING> --RTOutFile <STRING> --RTOutFileType <STRING> --PSFilterType <STRING> --PSInterpolationType <STRING> --PSMultExponent <INTEGER> --PSFilterLen <INTEGER> --PSNumPoints <INTEGER> --PSPointsFile <STRING> --PSMagType <STRING> --PSOutWindow <INTEGER> --PSNormFactor <FLOAT> --PSNormType <STRING> --PSOutFile <STRING> --PSOutFileType <STRING> --MSMultExponent <INTEGER> --MSOutWindow <INTEGER> --MSFilterDelay <INTEGER> --MSNormFactor <FLOAT> --MSNormType <STRING> --MSOutFile <STRING> --MSOutFileType <STRING> --TCNormFactor <FLOAT> --TCNormType <STRING> --TCOutFile <STRING> --TCOutFileType <STRING> --TCOWFile <STRING> --TCOWFileType <STRING> --TCOWNormFactor <FLOAT> --TCOWNormType <STRING> --TCOWSkip <INTEGER> --TCOWPrewindow <INTEGER> --TCOWLength <INTEGER> Refer to the manual and samples for options details and file format. AUTHOR
This manual page was written by Jaromir Mike <mira.mikes@seznam.cz>, for the Debian project (but may be used by others). August 30, 2011 DRC(1)
All times are GMT -4. The time now is 05:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy