Strip Line Feed from the Kshell Variable - I got it

Strip Line Feed from the Kshell Variable - I got it

Post by BN.Sar » Thu, 26 Sep 2002 05:14:26



Greetings,

I am able to fix the line feed problem using

CTL_TraceFile=ora_$(print -- $SPid)_${GN}.trc

Sorry for the trouble.

Regards & thanks
BN

 
 
 

1. Strip Line Feed from the Kshell Variable

Greetings

I am using Ksh98, I will be using this script in AIX and SUN boxes

Here is what I am doing in the script:

SPid=$( echo " $SYSTEM
        set heading off feedback off verify off timing off
        select spid from v\$process  where addr=(select paddr from
v\$session  where audsid=userenv('sessionid'));
        alter database backup controlfile to trace;
        alter database backup controlfile to '$Backup_CTL_File';"|
sqlplus -s )
CTL_TraceFile=ora_${SPid}_${GN}.trc

(/u001/bin)echo "$SPid" |od -a
0000000   lf   1   9   8   5   4  lf
0000007
(/u001/bin)echo $SPid |od  
0000000  030471 034065 032012
0000006
(/u001/bin)echo $SPid |od -c            
0000000    1   9   8   5   4  \n
0000006

my file looks like this:
ora_
19936
_nb.trc

I want the file name to be ora_19936_nb.trc.

Please help

Regards & Thanks
BN

2. How do I set a socket to non-blocking?

3. HELP: How do I read a file line-by-line without getting spaces stripped?

4. Tweaking configure files

5. Capitalize the first letter of a variable only: Kshell

6. new version of bash

7. Getting multiple lines of text into a variable?

8. Lilo & cylinders > 1023

9. Getting PID of spawned processes from a KShell

10. Formattet output inside variable / line brak inside variable

11. 2 values to variables line by line (Please Help

12. extract a line from multi-line variable

13. stripped and not stripped...