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


I am able to fix the line feed problem using

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

Sorry for the trouble.

Regards & thanks


1. Strip Line Feed from the Kshell Variable


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 )

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

my file looks like this:

I want the file name to be ora_19936_nb.trc.

Please help

Regards & Thanks

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...