RE: Unix question
grep -v try will give you all the lines which do not contain "try" cat |sed "s/try//g" > newfile will strip the characters "try" from all lines HTH, Bambi. -Original Message- Sent: Monday, December 22, 2003 6:54 AM To: Multiple recipients of list ORACLE-L Hallo all of you, Is there anyone whom could help me with the unix command how to find all rows , that doesnt exists "try" in a file. I mean how to find all rows which doesnt have the characters try in. Maybe this is too simple, but would appreciate anyone whom could give me some quick help. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Bellow, Bambi INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
Hi, You can use the grep command in the following manner: grep -v try filename The option -v negates the search pattern, meaning rows which do not have a try string in them. The string can be enclosed in double quotes as well, this is useful if you are searching for multiple patterns... Hope this will help. Regards kesh -Original Message-From: Gene Sais [mailto:[EMAIL PROTECTED]Sent: Monday, December 22, 2003 6:39 PMTo: Multiple recipients of list ORACLE-LSubject: Re: Unix question grep command will help you or you could venture to the sed command. grep is probably the most used unix command. To learn more, man grep . >>> [EMAIL PROTECTED] 12/22/03 07:54AM >>>Hallo all of you,Is there anyone whom could help me with the unix command how to find all rows , that doesnt exists "try" in a file.I mean how to find all rows which doesnt have the characters try in.Maybe this is too simple, but would appreciate anyone whom could give me some quick help.Thanks in advanceRoland-- Please see the official ORACLE-L FAQ: http://www.orafaq.net-- Author: INET: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services-To REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing). This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com
Re: Unix question
grep command will help you or you could venture to the sed command. grep is probably the most used unix command. To learn more, man grep . >>> [EMAIL PROTECTED] 12/22/03 07:54AM >>>Hallo all of you,Is there anyone whom could help me with the unix command how to find all rows , that doesnt exists "try" in a file.I mean how to find all rows which doesnt have the characters try in.Maybe this is too simple, but would appreciate anyone whom could give me some quick help.Thanks in advanceRoland-- Please see the official ORACLE-L FAQ: http://www.orafaq.net-- Author: INET: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services-To REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).
Re: unix question
Something our Unix admins tend to do is move the files along different directories. E.g. they start in dir1; after succesfull backup, move them to dir2, etc. and after succesfull backup in dir4 delete them. So they should always get backed up 4 times even if you miss a run. Of course your backup needs to start in dir4 and work back to dir1 for obvious reasons. mvg/regards Jo [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/19/2003 21:20 Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject:unix question I want to store some files. I make a new copy every night. I want to archive it back 4 days. So after 4 days, I want to delete the old copy. How do I do this? However, if i miss a nightly batch and have less than 4 copies, I do not want to delete any? -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <[EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: unix question
The following statement will delete all files older than 5 days: find . -name 'files_you_want_to_delete*.log' -mtime +5 -exec rm {} \; To test it, change the name of the file name and change the 'rm' to 'ls'. It should just list the files older than 5 days. That way you know it is working. Ron Smith -Original Message- Sent: Wednesday, November 19, 2003 3:10 PM To: Multiple recipients of list ORACLE-L USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE. COUNT=`ls -lrt /|wc -l` if [ $COUNT -ge 4 ] ; then find -name -mtime +4 -exec rm -f {} \; fi USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE. HTH, Bambi. -Original Message- Sent: Wednesday, November 19, 2003 2:21 PM To: Multiple recipients of list ORACLE-L I want to store some files. I make a new copy every night. I want to archive it back 4 days. So after 4 days, I want to delete the old copy. How do I do this? However, if i miss a nightly batch and have less than 4 copies, I do not want to delete any? -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <[EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Bellow, Bambi INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). If you are not the intended recipient of this e-mail message, any use, distribution or copying of the message is prohibited. Please let me know immediately by return e-mail if you have received this message by mistake, then delete the e-mail message. Thank you. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Smith, Ron L. INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: unix question
USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE. COUNT=`ls -lrt /|wc -l` if [ $COUNT -ge 4 ] ; then find -name -mtime +4 -exec rm -f {} \; fi USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE. HTH, Bambi. -Original Message- Sent: Wednesday, November 19, 2003 2:21 PM To: Multiple recipients of list ORACLE-L I want to store some files. I make a new copy every night. I want to archive it back 4 days. So after 4 days, I want to delete the old copy. How do I do this? However, if i miss a nightly batch and have less than 4 copies, I do not want to delete any? -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <[EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Bellow, Bambi INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: unix question
How about something like dir=foo if [ `ls -1 $dir` -lt 4 ]; then find $dir -mtime +4 | xargs rm fi On Wed, 2003-11-19 at 15:20, [EMAIL PROTECTED] wrote: > I want to store some files. I make a new copy every night. I want to archive it back > 4 days. So after 4 days, I want to delete the old copy. How do I do this? > > However, if i miss a nightly batch and have less than 4 copies, I do not want to > delete any? > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net Richard Quintin, DBA Information Systems & Computing, DBMS Virginia Tech -- "Please give me some good advice in your next letter. I promise not to follow it." -- Edna St. Vincent Millay -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Quintin, Richard INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: unix question
How about something like ... find /your_dir_name_here -name '*.log' -mtime +4 -exec \ rm {} \; Raj Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! -Original Message- Sent: Wednesday, November 19, 2003 3:21 PM To: Multiple recipients of list ORACLE-L I want to store some files. I make a new copy every night. I want to archive it back 4 days. So after 4 days, I want to delete the old copy. How do I do this? However, if i miss a nightly batch and have less than 4 copies, I do not want to delete any? -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <[EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ** This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you. **4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix Question
-- Pawan Dalmia <[EMAIL PROTECTED]> > > > My var partition is 99% full of which there are lot of files in /var/tmp > directory. > Can i delete this files ? Probably. Older ones are a better bet: cd /var/tmp; find . -atime +7 -type f | xargs rm -f; Question is what job leaves files behind in /var/tmp because that needs to be changed. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Lembark INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
> -Original Message- > From: STEVE OLLIG [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 3:23 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > but the syntax IS annoying and tedious at best. speaking as > a *NIX bigot > who landed a job with a fair share of legacy VMS work that > needs doing. > > it really pisses me off when i type SHOW SYSTEM/FULL instead > of ps -efl on > my sun box ;) Whine, whine! If you don't want to abbreviate your typing with "SH SYS/F", follow this: In your SYS$LOGIN:LOGIN.COM, add this line: $ IF F$TYPE(PS).EQS."" THEN PS :== $SYS$LOGIN:PS.COM The "IF" will only define it if it hasn't already been defined. Then, from the command line, "CREATE SYS$LOGIN:PS.COM", and paste this in your terminal window: $! ps.com $! $! Quickie for Unixy-types. $! $ ON WARNING THEN EXIT $ ON CONTROL_Y THEN EXIT $! $ args = F$EDIT(p1,"UPPER,COLLAPSE") $ parm = "" $ IF args.eqs."-EFL" THEN parm = "/FULL" $ SHOW SYSTEM'parm' $! $ EXIT ...then hit to save it. No need to worry about an execution security bit on VMS for command procs. If your LOGIN.COM is fully re-entrant (most aren't), you can simply @SYS$LOGIN:LOGIN.COM to get your "ps" command, just like ". ~/.profile" for Korn. Your best bet is to logout and back in. Likewise, you can add the following quickies to your LOGIN.COM: $ cat :== type $ cd :== set default $ grep :== search $ up :== set default [-] $ ls :== directory $ ll :== directory/size=all/date=modified/columns=10/width=(file=38,size=7) Please only use these interactively. If your LOGIN.COM separates out modes of operation (e.g. "IF F$MODE().EQS."INTERACTIVE"), put these symbol refinitions in the INTERACTIVE area and not in BATCH or NETWORK. If you'd like more help with your VMS environment, give me a holler directly and we'll get you some help. Rich Jesse System/Database Administrator [EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jesse, Rich INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
-- STEVE OLLIG <[EMAIL PROTECTED]> on 08/27/02 12:23:30 -0800 > but the syntax IS annoying and tedious at best. speaking as a *NIX bigot > who landed a job with a fair share of legacy VMS work that needs doing. > > it really pisses me off when i type SHOW SYSTEM/FULL instead of ps -efl on > my sun box ;) type "sho sys/ful" instead. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
but the syntax IS annoying and tedious at best. speaking as a *NIX bigot who landed a job with a fair share of legacy VMS work that needs doing. it really pisses me off when i type SHOW SYSTEM/FULL instead of ps -efl on my sun box ;) -Original Message- [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 11:43 AM To: Multiple recipients of list ORACLE-L Oh I agree - it was a rock solid platform, but the syntax was annoying and tedious at best. Scott Shafer San Antonio, TX 210.581.6217 > -Original Message- > From: Steven Lembark [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 11:13 AM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > > -- [EMAIL PROTECTED] > > > Obviously. If you had worked on VMS, why would you want to emulate it? > > Actually the platform had a number of virtues -- file > versions not the least, along with separate system access. > DCL itself had some nice features, if they'd only added > pipes it would've been equivalent to most *NIX shells w/ > the added benefit of lexical var's. > > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 800 762 1582 > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Steven Lembark > INET: [EMAIL PROTECTED] > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California-- Public Internet access / Mailing Lists > > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: STEVE OLLIG INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
-- "Jesse, Rich" <[EMAIL PROTECTED]> > Starting in VMS 7.0 or 7.1 (I forget which), you *can* use pipes: > > $ GREP := SEARCH SYS$PIPE > $ PIPE SHOW SYSTEM | GREP ora_ > > And it gets even better with "SET PROCESS/PARSE=EXTENDED" on the Alphas... > > :) Uncle Kenny's ghost can enjoy them; the rest of us are on *NIX :-) -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Lembark INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Starting in VMS 7.0 or 7.1 (I forget which), you *can* use pipes: $ GREP := SEARCH SYS$PIPE $ PIPE SHOW SYSTEM | GREP ora_ And it gets even better with "SET PROCESS/PARSE=EXTENDED" on the Alphas... :) Rich Jesse System/Database Administrator [EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA > -Original Message- > From: Steven Lembark [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 11:13 AM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > > > -- [EMAIL PROTECTED] > > > Obviously. If you had worked on VMS, why would you want to > emulate it? > > Actually the platform had a number of virtues -- file > versions not the least, along with separate system access. > DCL itself had some nice features, if they'd only added > pipes it would've been equivalent to most *NIX shells w/ > the added benefit of lexical var's. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jesse, Rich INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Oh I agree - it was a rock solid platform, but the syntax was annoying and tedious at best. Scott Shafer San Antonio, TX 210.581.6217 > -Original Message- > From: Steven Lembark [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 11:13 AM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > > -- [EMAIL PROTECTED] > > > Obviously. If you had worked on VMS, why would you want to emulate it? > > Actually the platform had a number of virtues -- file > versions not the least, along with separate system access. > DCL itself had some nice features, if they'd only added > pipes it would've been equivalent to most *NIX shells w/ > the added benefit of lexical var's. > > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 800 762 1582 > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Steven Lembark > INET: [EMAIL PROTECTED] > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California-- Public Internet access / Mailing Lists > > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
-- [EMAIL PROTECTED] > Obviously. If you had worked on VMS, why would you want to emulate it? Actually the platform had a number of virtues -- file versions not the least, along with separate system access. DCL itself had some nice features, if they'd only added pipes it would've been equivalent to most *NIX shells w/ the added benefit of lexical var's. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Lembark INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Eve rocks? -Original Message- [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 10:53 AM To: Multiple recipients of list ORACLE-L Obviously. If you had worked on VMS, why would you want to emulate it? Scott Shafer San Antonio, TX 210.581.6217 > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 7:13 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > Mladen, > > Your magnificent intuition and superior powers of reasoning > have finally failed you. > > I've never touched VMS. ;) > > Jared > > > > > > > "Gogala, Mladen" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 08/26/2002 01:28 PM > Please respond to ORACLE-L > > > To: Multiple recipients of list ORACLE-L > <[EMAIL PROTECTED]> > cc: > Subject:RE: Unix question: how to display SID and path in > prompt > > > Jared, the "alias cd='go'" line immediately betrays you as a > former VMS person. Next thing you know and your aliases will > be like "set_def"" > > > -----Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Monday, August 26, 2002 3:08 PM > > To: Multiple recipients of list ORACLE-L > > Subject: RE: Unix question: how to display SID and path in prompt > > > > > > > Also be aware that when using backticks in your PS1 > > variable, you are > > > influencing $? as a result. > > > > I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 > > > > function go { > >\cd $1 > >typeset -Z2 _h; typeset -Z2 _m # 2 > > digits, zero padded > >_hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes > >_time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' > >typeset bold=$(tput bold) > >typeset shy=$(tput rmso) > >PS1="[ `pwd` ]" > >PS1=$PS1`echo > > "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}- > > $TTY > "` > ># need to be able to turn xtitle off when using 'go' > >if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then > > # don't do xtitle if NO_CD_TITLE is set or in SCREEN > > #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle > > ${MACHINE}:${PWD} > > : > >fi > > } > > > > alias cd='go ' > > > > > > 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist > > rm: cannot remove `this_file_does_not_exist': No such file or > > directory > > [ /home/jkstill/tmp ] > > > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > > 1 > > [ /home/jkstill/tmp ] > > > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > > 0 > > [ /home/jkstill/tmp ] > > > > 10:2-rsysdevdb:dv01:jkstill-3 > > > > > Jared > > > > > > > > > > > > "Curiel, David" <[EMAIL PROTECTED]> > > Sent by: [EMAIL PROTECTED] > > 08/26/2002 08:23 AM > > Please respond to ORACLE-L > > > > > > To: Multiple recipients of list ORACLE-L > > <[EMAIL PROTECTED]> > > cc: > > Subject:RE: Unix question: how to display SID > > and path in prompt > > > > > > > > > > Also be aware that when using backticks in your PS1 variable, you are > > influencing $? as a result. > > > > What happens, is that when you run a command (i.e. "rm > > ") and then say "echo $?", you > > are getting > > the > > return code ($?) of your PS1 execution (which is likely to > > always be 0) - > > NOT the $? of the "rm" command. > > > > David Curiel > > > > > > > > > > -- > > Please see the official ORACLE-L FAQ: http://www.orafaq.com > > -- > > Author: > > INET: [EMAIL PROTECTED] > > > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > > San Diego, California-- Public Internet access / Mailing Lists > > > > To REMOVE yourself from this mailing list, send an E-Mail message > > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and
RE: Unix question: how to display SID and path in prompt
Obviously. If you had worked on VMS, why would you want to emulate it? Scott Shafer San Antonio, TX 210.581.6217 > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 7:13 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > Mladen, > > Your magnificent intuition and superior powers of reasoning > have finally failed you. > > I've never touched VMS. ;) > > Jared > > > > > > > "Gogala, Mladen" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 08/26/2002 01:28 PM > Please respond to ORACLE-L > > > To: Multiple recipients of list ORACLE-L > <[EMAIL PROTECTED]> > cc: > Subject:RE: Unix question: how to display SID and path in > prompt > > > Jared, the "alias cd='go'" line immediately betrays you as a > former VMS person. Next thing you know and your aliases will > be like "set_def"" > > > -----Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Monday, August 26, 2002 3:08 PM > > To: Multiple recipients of list ORACLE-L > > Subject: RE: Unix question: how to display SID and path in prompt > > > > > > > Also be aware that when using backticks in your PS1 > > variable, you are > > > influencing $? as a result. > > > > I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 > > > > function go { > >\cd $1 > >typeset -Z2 _h; typeset -Z2 _m # 2 > > digits, zero padded > >_hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes > >_time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' > >typeset bold=$(tput bold) > >typeset shy=$(tput rmso) > >PS1="[ `pwd` ]" > >PS1=$PS1`echo > > "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}- > > $TTY > "` > ># need to be able to turn xtitle off when using 'go' > >if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then > > # don't do xtitle if NO_CD_TITLE is set or in SCREEN > > #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle > > ${MACHINE}:${PWD} > > : > >fi > > } > > > > alias cd='go ' > > > > > > 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist > > rm: cannot remove `this_file_does_not_exist': No such file or > > directory > > [ /home/jkstill/tmp ] > > > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > > 1 > > [ /home/jkstill/tmp ] > > > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > > 0 > > [ /home/jkstill/tmp ] > > > > 10:2-rsysdevdb:dv01:jkstill-3 > > > > > Jared > > > > > > > > > > > > "Curiel, David" <[EMAIL PROTECTED]> > > Sent by: [EMAIL PROTECTED] > > 08/26/2002 08:23 AM > > Please respond to ORACLE-L > > > > > > To: Multiple recipients of list ORACLE-L > > <[EMAIL PROTECTED]> > > cc: > > Subject:RE: Unix question: how to display SID > > and path in prompt > > > > > > > > > > Also be aware that when using backticks in your PS1 variable, you are > > influencing $? as a result. > > > > What happens, is that when you run a command (i.e. "rm > > ") and then say "echo $?", you > > are getting > > the > > return code ($?) of your PS1 execution (which is likely to > > always be 0) - > > NOT the $? of the "rm" command. > > > > David Curiel > > > > > > > > > > -- > > Please see the official ORACLE-L FAQ: http://www.orafaq.com > > -- > > Author: > > INET: [EMAIL PROTECTED] > > > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > > San Diego, California-- Public Internet access / Mailing Lists > > > > To REMOVE yourself from this mailing list, send an E-Mail message > > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > > the message BODY, include a line containing: UNSUB ORACLE-L > > (or the name of mailing list you want to be removed from). You ma
RE: Unix question: how to display SID and path in prompt
-- John Kanagaraj <[EMAIL PROTECTED]> > Mladen, > > Are you confusing this on account of your new-found attraction to the 'go' > command in MS SQL Server (formerly Sybase and T-SQL)? :-) > > I though that 'SET DEFAULT [Dir-name]' was the equivalent of 'cd' in > VMS... They have nothing whatsoever to do with each other, mainly becuase VMS doesn't really have the same notion of "working directory" that *NIX does. set def can accept a partial path (e.g., 'dka0:', '[sys.foobar]', or 'dka0:[sys.foobar].exe'). It takes whatever you give it as a default for commands which require a filename and uses them as the default portion of the name if one is not given (e.g., "del myfile" would take the device, dir & extension from the default). You can be working on dka100: and perform a set def dka0: without effecting the O/S treatment of dka0: -- the items given to set def needn't even exist since they are not used until the next time a path is given without that portion (e.g., you can put in a bogus device w/ valid directory and not know it until you forget to type the device). cd actually changes the O/S' view of your process and the destination path you give it. Performing a cd across file systems, for example, will leave the new one unable to umount; on VMS it wouldn't effect anything. You also cannot cd to a nonexistant directory. The two commands feel the same syntatically because you normally use relative paths after performing them; but the O/S' treatments are entirely different. enjoi. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Lembark INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Mladen, Are you confusing this on account of your new-found attraction to the 'go' command in MS SQL Server (formerly Sybase and T-SQL)? :-) I though that 'SET DEFAULT [Dir-name]' was the equivalent of 'cd' in VMS... John Kanagaraj Oracle Applications DBA DBSoft Inc (W): 408-970-7002 Disappointments are inevitable in Life, but discouragement is optional. You decide! ** The opinions and statements above are entirely my own and not those of my employer or clients ** > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 5:13 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > Mladen, > > Your magnificent intuition and superior powers of reasoning > have finally failed you. > > I've never touched VMS. ;) > > Jared > > > > > > > "Gogala, Mladen" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 08/26/2002 01:28 PM > Please respond to ORACLE-L > > > To: Multiple recipients of list ORACLE-L > <[EMAIL PROTECTED]> > cc: > Subject:RE: Unix question: how to display SID > and path in prompt > > > Jared, the "alias cd='go'" line immediately betrays you as a > former VMS person. Next thing you know and your aliases will > be like "set_def"" > -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: John Kanagaraj INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Mladen, Your magnificent intuition and superior powers of reasoning have finally failed you. I've never touched VMS. ;) Jared "Gogala, Mladen" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 08/26/2002 01:28 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject:RE: Unix question: how to display SID and path in prompt Jared, the "alias cd='go'" line immediately betrays you as a former VMS person. Next thing you know and your aliases will be like "set_def"" > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 3:08 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > > Also be aware that when using backticks in your PS1 > variable, you are > > influencing $? as a result. > > I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 > > function go { >\cd $1 >typeset -Z2 _h; typeset -Z2 _m # 2 > digits, zero padded >_hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes >_time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' >typeset bold=$(tput bold) >typeset shy=$(tput rmso) >PS1="[ `pwd` ]" >PS1=$PS1`echo > "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}- > $TTY > "` ># need to be able to turn xtitle off when using 'go' >if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then > # don't do xtitle if NO_CD_TITLE is set or in SCREEN > #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle > ${MACHINE}:${PWD} > : >fi > } > > alias cd='go ' > > > 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist > rm: cannot remove `this_file_does_not_exist': No such file or > directory > [ /home/jkstill/tmp ] > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > 1 > [ /home/jkstill/tmp ] > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > 0 > [ /home/jkstill/tmp ] > > 10:2-rsysdevdb:dv01:jkstill-3 > > > Jared > > > > > > "Curiel, David" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 08/26/2002 08:23 AM > Please respond to ORACLE-L > > > To: Multiple recipients of list ORACLE-L > <[EMAIL PROTECTED]> > cc: > Subject:RE: Unix question: how to display SID > and path in prompt > > > > > Also be aware that when using backticks in your PS1 variable, you are > influencing $? as a result. > > What happens, is that when you run a command (i.e. "rm > ") and then say "echo $?", you > are getting > the > return code ($?) of your PS1 execution (which is likely to > always be 0) - > NOT the $? of the "rm" command. > > David Curiel > > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: > INET: [EMAIL PROTECTED] > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California-- Public Internet access / Mailing Lists > > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Gogala, Mladen INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
That makes sense. I didn't see how my prompt would be effected other than by changing dirs, but you never know... Jared "Curiel, David" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 08/26/2002 01:03 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject:RE: Unix question: how to display SID and path in prompt Jared Writes: >> Also be aware that when using backticks in your PS1 variable, you are >> influencing $? as a result. >I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 That would be because in your example, PS1 is only being affected when you actually do a 'cd' In my case, (and I think that of the original poster), PS1 is being specified in the main body of my bash/ksh rc file, in which case it is evaluated every time you do any/every command. Your example is certainly more efficient, in that your the PATH information is only updated when your current directory is likely to have changed, but I actually echo every command's $? onto my prompt. i.e my prompt looks like: RC(1) azimuth:.../last_2/path_components$ Actually, I had to create a function to do this, so that $? was properly returned. function _cd { typeset saverc=$? typeset _path=`echo $PWD | sed '/\/.*\/.*\//{s%.*/\(.*/.*\)%.../\1%;}' ` echo "RC($saverc) $HOST:$_path\$ " return $saverc } PS1='`_cd`' Otherwise if you are simply setting PS1 with backticks in the main() of your rc file, then your $? is hosed. At least as far as I've experienced Thanks David -Original Message- Sent: Monday, August 26, 2002 12:58 PM To: [EMAIL PROTECTED] Cc: Curiel, David > Also be aware that when using backticks in your PS1 variable, you are > influencing $? as a result. I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 function go { \cd $1 typeset -Z2 _h; typeset -Z2 _m # 2 digits, zero padded _hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes _time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' typeset bold=$(tput bold) typeset shy=$(tput rmso) PS1="[ `pwd` ]" PS1=$PS1`echo "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}-$TTY > "` # need to be able to turn xtitle off when using 'go' if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then # don't do xtitle if NO_CD_TITLE is set or in SCREEN #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle ${MACHINE}:${PWD} : fi } alias cd='go ' 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist rm: cannot remove `this_file_does_not_exist': No such file or directory [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > echo $? 1 [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > echo $? 0 [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > Jared "Curiel, David" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 08/26/2002 08:23 AM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject:RE: Unix question: how to display SID and path in prompt Also be aware that when using backticks in your PS1 variable, you are influencing $? as a result. What happens, is that when you run a command (i.e. "rm ") and then say "echo $?", you are getting the return code ($?) of your PS1 execution (which is likely to always be 0) - NOT the $? of the "rm" command. David Curiel -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Curiel, David INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
-- "Curiel, David" <[EMAIL PROTECTED]> on 08/26/02 12:03:20 -0800 > Jared Writes: >>> Also be aware that when using backticks in your PS1 variable, you are >>> influencing $? as a result. > >> I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 And, what's more, you don't need to backtick the stuff during normal operation: the host and username won't normally change and PWD is a reasonable approximation of where you are. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Jared, the "alias cd='go'" line immediately betrays you as a former VMS person. Next thing you know and your aliases will be like "set_def"" > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 3:08 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Unix question: how to display SID and path in prompt > > > > Also be aware that when using backticks in your PS1 > variable, you are > > influencing $? as a result. > > I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 > > function go { >\cd $1 >typeset -Z2 _h; typeset -Z2 _m # 2 > digits, zero padded >_hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes >_time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' >typeset bold=$(tput bold) >typeset shy=$(tput rmso) >PS1="[ `pwd` ]" >PS1=$PS1`echo > "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}- > $TTY > "` ># need to be able to turn xtitle off when using 'go' >if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then > # don't do xtitle if NO_CD_TITLE is set or in SCREEN > #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle > ${MACHINE}:${PWD} > : >fi > } > > alias cd='go ' > > > 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist > rm: cannot remove `this_file_does_not_exist': No such file or > directory > [ /home/jkstill/tmp ] > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > 1 > [ /home/jkstill/tmp ] > > 10:2-rsysdevdb:dv01:jkstill-3 > echo $? > 0 > [ /home/jkstill/tmp ] > > 10:2-rsysdevdb:dv01:jkstill-3 > > > Jared > > > > > > "Curiel, David" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 08/26/2002 08:23 AM > Please respond to ORACLE-L > > > To: Multiple recipients of list ORACLE-L > <[EMAIL PROTECTED]> > cc: > Subject:RE: Unix question: how to display SID > and path in prompt > > > > > Also be aware that when using backticks in your PS1 variable, you are > influencing $? as a result. > > What happens, is that when you run a command (i.e. "rm > ") and then say "echo $?", you > are getting > the > return code ($?) of your PS1 execution (which is likely to > always be 0) - > NOT the $? of the "rm" command. > > David Curiel > > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: > INET: [EMAIL PROTECTED] > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California-- Public Internet access / Mailing Lists > > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Gogala, Mladen INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
Jared Writes: >> Also be aware that when using backticks in your PS1 variable, you are >> influencing $? as a result. >I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 That would be because in your example, PS1 is only being affected when you actually do a 'cd' In my case, (and I think that of the original poster), PS1 is being specified in the main body of my bash/ksh rc file, in which case it is evaluated every time you do any/every command. Your example is certainly more efficient, in that your the PATH information is only updated when your current directory is likely to have changed, but I actually echo every command's $? onto my prompt. i.e my prompt looks like: RC(1) azimuth:.../last_2/path_components$ Actually, I had to create a function to do this, so that $? was properly returned. function _cd { typeset saverc=$? typeset _path=`echo $PWD | sed '/\/.*\/.*\//{s%.*/\(.*/.*\)%.../\1%;}' ` echo "RC($saverc) $HOST:$_path\$ " return $saverc } PS1='`_cd`' Otherwise if you are simply setting PS1 with backticks in the main() of your rc file, then your $? is hosed. At least as far as I've experienced Thanks David -Original Message- Sent: Monday, August 26, 2002 12:58 PM To: [EMAIL PROTECTED] Cc: Curiel, David > Also be aware that when using backticks in your PS1 variable, you are > influencing $? as a result. I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 function go { \cd $1 typeset -Z2 _h; typeset -Z2 _m # 2 digits, zero padded _hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes _time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' typeset bold=$(tput bold) typeset shy=$(tput rmso) PS1="[ `pwd` ]" PS1=$PS1`echo "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}-$TTY > "` # need to be able to turn xtitle off when using 'go' if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then # don't do xtitle if NO_CD_TITLE is set or in SCREEN #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle ${MACHINE}:${PWD} : fi } alias cd='go ' 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist rm: cannot remove `this_file_does_not_exist': No such file or directory [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > echo $? 1 [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > echo $? 0 [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > Jared "Curiel, David" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 08/26/2002 08:23 AM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject:RE: Unix question: how to display SID and path in prompt Also be aware that when using backticks in your PS1 variable, you are influencing $? as a result. What happens, is that when you run a command (i.e. "rm ") and then say "echo $?", you are getting the return code ($?) of your PS1 execution (which is likely to always be 0) - NOT the $? of the "rm" command. David Curiel -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Curiel, David INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
> Also be aware that when using backticks in your PS1 variable, you are > influencing $? as a result. I don't find that to be true with pdksh - PD KSH v5.2.14 99/07/13.2 function go { \cd $1 typeset -Z2 _h; typeset -Z2 _m # 2 digits, zero padded _hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60" # hours, minutes _time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m' typeset bold=$(tput bold) typeset shy=$(tput rmso) PS1="[ `pwd` ]" PS1=$PS1`echo "\n\n${bold}$_time-${UMACHINE}:${ORACLE_SID}${shy}:${LOGNAME}-$TTY > "` # need to be able to turn xtitle off when using 'go' if [ "$TERM" = "xterm2" -o "$TERM" = "xterm" ] ;then # don't do xtitle if NO_CD_TITLE is set or in SCREEN #[ "$NO_CD_TITLE" -o "$WINDOW" -ge 1 ] || xtitle ${MACHINE}:${PWD} : fi } alias cd='go ' 10:2-rsysdevdb:dv01:jkstill-3 > rm this_file_does_not_exist rm: cannot remove `this_file_does_not_exist': No such file or directory [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > echo $? 1 [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > echo $? 0 [ /home/jkstill/tmp ] 10:2-rsysdevdb:dv01:jkstill-3 > Jared "Curiel, David" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 08/26/2002 08:23 AM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject:RE: Unix question: how to display SID and path in prompt Also be aware that when using backticks in your PS1 variable, you are influencing $? as a result. What happens, is that when you run a command (i.e. "rm ") and then say "echo $?", you are getting the return code ($?) of your PS1 execution (which is likely to always be 0) - NOT the $? of the "rm" command. David Curiel -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question: how to display SID and path in prompt
-- Philip Douglass <[EMAIL PROTECTED]> > The substring extraction of $PWD is ksh specific. You could do it other > ways, but this way it uses ksh builtins, so it is _fast_ bash and most recent sh imlementations also support the ksh-style variable munging. bash makes it even simpler by adding escape sequences for PS1: \u = user \h = host \W = basename( $PWD ) \$ = '#' if SU else '$'. so: PS1='\u@\h:\W \$ '; gives username@hostname:dirname $ for normal users or ending with '#' if you are SU. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Lembark INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question: how to display SID and path in prompt
--_=_NextPart_001_01C24D0B.863A4560 Content-Type: text/plain; charset="iso-8859-1" Also be aware that when using backticks in your PS1 variable, you are influencing $? as a result. What happens, is that when you run a command (i.e. "rm ") and then say "echo $?", you are getting the return code ($?) of your PS1 execution (which is likely to always be 0) - NOT the $? of the "rm" command. David Curiel -Original Message- Sent: Monday, August 26, 2002 10:03 AM To: Multiple recipients of list ORACLE-L Put $PWD in there somewhere. I use ${PWD#${PWD%%*([!/])/*([!/])}} to display the last two directory levels, so my prompt never gets TOO long. The substring extraction of $PWD is ksh specific. You could do it other ways, but this way it uses ksh builtins, so it is _fast_ As an example, when I am in my $ORACLE_HOME, my prompt ends up looking something like: product/8.1.7 [09:54:42 AM] 181$ where 181 is the current command history number. - Original Message - To: Multiple recipients of list ORACLE-L <mailto:[EMAIL PROTECTED]> Sent: Monday, August 26, 2002 9:48 AM Hi! In my .profile of the oracle user (we're mostly using ksh here), I have set up the prompt that it gives me the host name and database SID. # always displays host name and Oracle SID as prompt PS1="`hostname`;`echo $ORACLE_SID`$ " How can I extend this prompt to also include the current directory that I'm in? e.g. prod1;PCLDB1; u010/app/oracle/admin/PCLDB1 Thanks, Helmut --_=_NextPart_001_01C24D0B.863A4560 Content-Type: text/html; charset="iso-8859-1" Unix question: how to display SID and path in prompt Also be aware that when using backticks in your PS1 variable, you are influencing $? as a result. What happens, is that when you run a command (i.e. "rm <some_file_that_doesnt_exist>") and then say "echo $?", you are getting the return code ($?) of your PS1 execution (which is likely to always be 0) - NOT the $? of the "rm" command. David Curiel -Original Message-From: Philip Douglass [mailto:[EMAIL PROTECTED]]Sent: Monday, August 26, 2002 10:03 AMTo: Multiple recipients of list ORACLE-LSubject: Re: Unix question: how to display SID and path in prompt Put $PWD in there somewhere. I use ${PWD#${PWD%%*([!/])/*([!/])}} to display the last two directory levels, so my prompt never gets TOO long. The substring extraction of $PWD is ksh specific. You could do it other ways, but this way it uses ksh builtins, so it is _fast_ As an example, when I am in my $ORACLE_HOME, my prompt ends up looking something like: product/8.1.7 [09:54:42 AM] 181$ where 181 is the current command history number. - Original Message - From: mailto:[EMAIL PROTECTED]";>Daiminger, Helmut To: mailto:[EMAIL PROTECTED]";>Multiple recipients of list ORACLE-L Sent: Monday, August 26, 2002 9:48 AM Subject: Unix question: how to display SID and path in prompt Hi! In my .profile of the oracle user (we're mostly using ksh here), I have set up the prompt that it gives me the host name and database SID. # always displays host name and Oracle SID as prompt PS1="`hostname`;`echo $ORACLE_SID`$ " How can I extend this prompt to also include the current directory that I'm in? e.g. prod1;PCLDB1; u010/app/oracle/admin/PCLDB1 Thanks, Helmut --_=_NextPart_001_01C24D0B.863A4560-- -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Curiel, David INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question: how to display SID and path in prompt
Title: Unix question: how to display SID and path in prompt Put $PWD in there somewhere. I use ${PWD#${PWD%%*([!/])/*([!/])}} to display the last two directory levels, so my prompt never gets TOO long. The substring extraction of $PWD is ksh specific. You could do it other ways, but this way it uses ksh builtins, so it is _fast_ As an example, when I am in my $ORACLE_HOME, my prompt ends up looking something like: product/8.1.7 [09:54:42 AM] 181$ where 181 is the current command history number. - Original Message - From: Daiminger, Helmut To: Multiple recipients of list ORACLE-L Sent: Monday, August 26, 2002 9:48 AM Subject: Unix question: how to display SID and path in prompt Hi! In my .profile of the oracle user (we're mostly using ksh here), I have set up the prompt that it gives me the host name and database SID. # always displays host name and Oracle SID as prompt PS1="`hostname`;`echo $ORACLE_SID`$ " How can I extend this prompt to also include the current directory that I'm in? e.g. prod1;PCLDB1; u010/app/oracle/admin/PCLDB1 Thanks, Helmut
Re: Unix question: how to display SID and path in prompt
-- "Daiminger, Helmut" <[EMAIL PROTECTED]> > Hi! > > In my .profile of the oracle user (we're mostly using ksh here), I have > set up the prompt that it gives me the host name and database SID. > ># always displays host name and Oracle SID as prompt > PS1="`hostname`;`echo $ORACLE_SID`$ " > > How can I extend this prompt to also include the current directory that > I'm in? > > e.g. prod1;PCLDB1; u010/app/oracle/admin/PCLDB1 Back-ticks can be a pain to track, the $() notation in ksh makes things a bit less error prone. Also, no need to echo a variable via shell execution if it is available in the current proc: PS1="$(hostname):$ORACLE_SID:\$PWD \$ "; will give you the full path or PS1="$(hostname:$ORACLE_SID:./\${PWD##*/} \$ "; will give you the relative path (i.e., $PWD stripped of any text leading to a '/'). This is equivalent to bash's: PS1='\h:$ORACLE_SID:\W \$ '; -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Lembark INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: UNIX QUESTION.
I'm not sure on the Unix side, but that Windows command will fire the copy off in a separate window and immediately return command to sqlplus, whilst the copying is still occurring. eg, consider the different behaviour of the following 2 commands under Windows SQLPlus: SQL> host start cmd /c pause SQL> host pause For Unix, Would you need to get the job to run in the background (via a & maybe) to achieve the same effect? HTH, Bruce Reardon -Original Message- Sent: Wednesday, 20 February 2002 10:11 [Hamid Alavi] > ANYBODY KNOW WHAT'S THE EQUIVALENT OF THIS COMMAND IN UNIX? > > host start cmd /c copy /u04/oradata/AMDEV/rbs01.dbf D:\oradata\fred\backup host cp /u04/oradata/AMDEV/rbs01.dbf /oradata/fred/backup -- James Manning <[EMAIL PROTECTED]> -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Reardon, Bruce (CALBBAY) INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: UNIX QUESTION.
[Hamid Alavi] > ANYBODY KNOW WHAT'S THE EQUIVALENT OF THIS COMMAND IN UNIX? > > host start cmd /c copy /u04/oradata/AMDEV/rbs01.dbf D:\oradata\fred\backup host cp /u04/oradata/AMDEV/rbs01.dbf /oradata/fred/backup -- James Manning <[EMAIL PROTECTED]> GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7 9C8E A0BF B026 EEBB F6E4 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: James Manning INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
Afternoon Roland, Just a couple of hints here. Firstly: Any command that returns an error can be checked for and you can also exit with a code of your choice. so #!/bin/sh export MAILDBA="[EMAIL PROTECTED]" sqlplus -s konto/icakort << ! set heading off verify off feedback off termout off pages 0 begin konto.fillbilbotables.anrop; END; / if [ $? -ne 0 ] then mail -s "Konto inte so brar..." \ $MAILDBA
RE: Unix question
Hi, I think you must write the script in seperated file let say myora_sql.sql remember to exit the sql session then you can do this ... sqlplus konto/icakort @myora_sql.sql > '/my_log_home/konto_myora_sql.log' Sinardy -Original Message- [EMAIL PROTECTED] Sent: 28 January 2002 13:15 To: Multiple recipients of list ORACLE-L Hallo, I have this unix script. I would like to get a errorlog(a file) if the pl/sql procedure konto.fillbotables.anrop doesnt start at all. Please tell me how to write the code and where to include it in this shell script. Give me example on how to write the code too. #!/bin/sh . /usr/bin/orasetup.sh . /d31/appl/konto/bat/movefiles.sh sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl log=/d31/appl/konto/log/ehbgrupp.log sqlplus -s konto/icakort << ! set heading off set verify off set feedback off set termout off set pages 0 begin konto.fillbilbotables.anrop; END; / EXIT Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Sinard Xing INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
I agree and just to add, use environment variables for your paths or better yet, create an environment script that gets sourced by each script. This way you only need to update one environment script when the environment changes. >>> [EMAIL PROTECTED] 01/11/02 10:40AM >>> Off the top of my head, I am thinking that the current directory is not in your path. That is not an unusual thing. Specify the whole filename when executing it (including the path). Of course, if the script calls other scripts (or uses other files) and expecting them in the current directory you will have the same issue I believe. Its bad practice not to specify the path in scripts. -Original Message- Maheswara Sent: Friday, January 11, 2002 7:05 AM To: Multiple recipients of list ORACLE-L Roland, The file permissions on the file - loadfiles.sh --- might be set to no execute, no read, no write permissions for the group and others. In this case, only the owner of the file could access the file. Hence, under what user id are you calling this script? Also, check the permissions on the --- loadfiles.sh. Or change the file permissions on - loadfiles.sh ---. Go to the directory where - loadfiles.sh --- exists. Enter --- chmod 777 loadfiles.sh. Then run your command. If you get error during chmod command, it means you are not the owner of the file and hence, you are getting the error. In that case, you have two options. Either contact your sysadmin and ask him to change the file permissions on loadfiles.sh. Or if you know the owner's userid and pass word, then log on as that user and then change permissions on loadfiles.sh by executing the command chmod 777 loadfiles.sh Rao -Original Message- Sent: Friday, January 11, 2002 8:00 AM To: Multiple recipients of list ORACLE-L Hi can you do a "cat" on that file? if no: Maybe there are invisible characters as the back/front of the file name. try mv *loadfiles.sh* loadfiles.sh (see if you get message that filenames are identical) If that is not the problem, maybe the script calls a file that doesn't exist Jack [EMAIL PROTECTED]@fatcity.com on 11-01-2002 13:25:18 Please respond to [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc:(bcc: Jack van Zanen/nlzanen1/External/MEY/NL) Hallo, why do I get the error message "No such file or directory". when I try to run unix script loadfiles.sh which is located in the directory /konto/tmp. This file, loadfiles.sh really exists in that directory. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Rao, Maheswara INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Kimberly Smith INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Gene Sais INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question
Roland. Be carefull when issuing command to execute something in Unix. It is unforgiving and will execute the matching command that it first finds in it's path. As an example: the PATH=fo1;of2;of3 and there is a command called fobar.sh in both of1 and of3. You want the execute the fobar.sh that resides in of3. If you are at / and issue fobar.sh it will execute the one in of1 not of3. It is best to issue the full path such as ./of3/fobar.sh or be in the directory where your fobar.sh resides and then issue ./fobar.sh. ROR mª¿ªm >>> [EMAIL PROTECTED] 01/11/02 08:40AM >>> Also, either the directory needs to be in your PATH, or you need to execute it while within that directory by typing ./loadfiles.sh or, you need to specify the full path when executing the script. -Joe At 04:50 AM 1/11/02 -0800, you wrote: >Check the first line in the script so that Received: from CONNECT-MTA by galottethe >path to the shell is >correct. >example: >#!/bin/sh > >and maybe check the permissions on the file. > >/Patrik Malinen > >On Fri, 11 Jan 2002 [EMAIL PROTECTED] wrote: > > > Hallo, > > > > why do I get the error message "No such file or directory". > > when I try to run unix script loadfiles.sh which is located in > > the directory /konto/tmp. > > > > This file, loadfiles.sh really exists in that directory. > > > > > > Thanks in advance > > > > > > Roland > > > > > > > > > > -- > > Please see the official ORACLE-L FAQ: http://www.orafaq.com > > -- > > Author: > > INET: [EMAIL PROTECTED] > > > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > > San Diego, California-- Public Internet access / Mailing Lists > > > > To REMOVE yourself from this mailing list, send an E-Mail message > > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > > the message BODY, include a line containing: UNSUB ORACLE-L > > (or the name of mailing list you want to be removed from). You may > > also send the HELP command for other information (like subscribing). > > > >-- >Please see the official ORACLE-L FAQ: http://www.orafaq.com >-- >Author: Patrik Malinen > INET: [EMAIL PROTECTED] > >Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 >San Diego, California-- Public Internet access / Mailing Lists > >To REMOVE yourself from this mailing list, send an E-Mail message >to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in >the message BODY, include a line containing: UNSUB ORACLE-L >(or the name of mailing list you want to be removed from). You may >also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joe Raube INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ron Rogers INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question
-- [EMAIL PROTECTED] on 01/11/02 04:25:18 -0800 > Hallo, > > why do I get the error message "No such file or directory". > when I try to run unix script loadfiles.sh which is located in > the directory /konto/tmp. Check your #! line, it probably has a bad path in it. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
Off the top of my head, I am thinking that the current directory is not in your path. That is not an unusual thing. Specify the whole filename when executing it (including the path). Of course, if the script calls other scripts (or uses other files) and expecting them in the current directory you will have the same issue I believe. Its bad practice not to specify the path in scripts. -Original Message- Maheswara Sent: Friday, January 11, 2002 7:05 AM To: Multiple recipients of list ORACLE-L Roland, The file permissions on the file - loadfiles.sh --- might be set to no execute, no read, no write permissions for the group and others. In this case, only the owner of the file could access the file. Hence, under what user id are you calling this script? Also, check the permissions on the --- loadfiles.sh. Or change the file permissions on - loadfiles.sh ---. Go to the directory where - loadfiles.sh --- exists. Enter --- chmod 777 loadfiles.sh. Then run your command. If you get error during chmod command, it means you are not the owner of the file and hence, you are getting the error. In that case, you have two options. Either contact your sysadmin and ask him to change the file permissions on loadfiles.sh. Or if you know the owner's userid and pass word, then log on as that user and then change permissions on loadfiles.sh by executing the command chmod 777 loadfiles.sh Rao -Original Message- Sent: Friday, January 11, 2002 8:00 AM To: Multiple recipients of list ORACLE-L Hi can you do a "cat" on that file? if no: Maybe there are invisible characters as the back/front of the file name. try mv *loadfiles.sh* loadfiles.sh (see if you get message that filenames are identical) If that is not the problem, maybe the script calls a file that doesn't exist Jack [EMAIL PROTECTED]@fatcity.com on 11-01-2002 13:25:18 Please respond to [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc:(bcc: Jack van Zanen/nlzanen1/External/MEY/NL) Hallo, why do I get the error message "No such file or directory". when I try to run unix script loadfiles.sh which is located in the directory /konto/tmp. This file, loadfiles.sh really exists in that directory. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Rao, Maheswara INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Kimberly Smith INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question
Also, either the directory needs to be in your PATH, or you need to execute it while within that directory by typing ./loadfiles.sh or, you need to specify the full path when executing the script. -Joe At 04:50 AM 1/11/02 -0800, you wrote: >Check the first line in the script so that the path to the shell is >correct. >example: >#!/bin/sh > >and maybe check the permissions on the file. > >/Patrik Malinen > >On Fri, 11 Jan 2002 [EMAIL PROTECTED] wrote: > > > Hallo, > > > > why do I get the error message "No such file or directory". > > when I try to run unix script loadfiles.sh which is located in > > the directory /konto/tmp. > > > > This file, loadfiles.sh really exists in that directory. > > > > > > Thanks in advance > > > > > > Roland > > > > > > > > > > -- > > Please see the official ORACLE-L FAQ: http://www.orafaq.com > > -- > > Author: > > INET: [EMAIL PROTECTED] > > > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > > San Diego, California-- Public Internet access / Mailing Lists > > > > To REMOVE yourself from this mailing list, send an E-Mail message > > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > > the message BODY, include a line containing: UNSUB ORACLE-L > > (or the name of mailing list you want to be removed from). You may > > also send the HELP command for other information (like subscribing). > > > >-- >Please see the official ORACLE-L FAQ: http://www.orafaq.com >-- >Author: Patrik Malinen > INET: [EMAIL PROTECTED] > >Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 >San Diego, California-- Public Internet access / Mailing Lists > >To REMOVE yourself from this mailing list, send an E-Mail message >to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in >the message BODY, include a line containing: UNSUB ORACLE-L >(or the name of mailing list you want to be removed from). You may >also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joe Raube INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
Roland, The file permissions on the file - loadfiles.sh --- might be set to no execute, no read, no write permissions for the group and others. In this case, only the owner of the file could access the file. Hence, under what user id are you calling this script? Also, check the permissions on the --- loadfiles.sh. Or change the file permissions on - loadfiles.sh ---. Go to the directory where - loadfiles.sh --- exists. Enter --- chmod 777 loadfiles.sh. Then run your command. If you get error during chmod command, it means you are not the owner of the file and hence, you are getting the error. In that case, you have two options. Either contact your sysadmin and ask him to change the file permissions on loadfiles.sh. Or if you know the owner's userid and pass word, then log on as that user and then change permissions on loadfiles.sh by executing the command chmod 777 loadfiles.sh Rao -Original Message- Sent: Friday, January 11, 2002 8:00 AM To: Multiple recipients of list ORACLE-L Hi can you do a "cat" on that file? if no: Maybe there are invisible characters as the back/front of the file name. try mv *loadfiles.sh* loadfiles.sh (see if you get message that filenames are identical) If that is not the problem, maybe the script calls a file that doesn't exist Jack [EMAIL PROTECTED]@fatcity.com on 11-01-2002 13:25:18 Please respond to [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc:(bcc: Jack van Zanen/nlzanen1/External/MEY/NL) Hallo, why do I get the error message "No such file or directory". when I try to run unix script loadfiles.sh which is located in the directory /konto/tmp. This file, loadfiles.sh really exists in that directory. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Rao, Maheswara INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
Have'nt we done this one already ?. Whats in the directory and give us a listing of your script ??? I feel we are drifting away from Oracle related issues here !! -Original Message- Sent: 11 January 2002 12:25 To: Multiple recipients of list ORACLE-L Hallo, why do I get the error message "No such file or directory". when I try to run unix script loadfiles.sh which is located in the directory /konto/tmp. This file, loadfiles.sh really exists in that directory. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Robertson Lee - lerobe INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question
Hi can you do a "cat" on that file? if no: Maybe there are invisible characters as the back/front of the file name. try mv *loadfiles.sh* loadfiles.sh (see if you get message that filenames are identical) If that is not the problem, maybe the script calls a file that doesn't exist Jack [EMAIL PROTECTED]@fatcity.com on 11-01-2002 13:25:18 Please respond to [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc:(bcc: Jack van Zanen/nlzanen1/External/MEY/NL) Hallo, why do I get the error message "No such file or directory". when I try to run unix script loadfiles.sh which is located in the directory /konto/tmp. This file, loadfiles.sh really exists in that directory. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). === De informatie verzonden met dit E-mail bericht is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is verboden. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan. Ernst & Young staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden E-mail, noch voor tijdige ontvangst daarvan. === The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. Ernst & Young is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. === -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question
Perhaps that directory is not in your path. Or, the script may be referencing a file that does not exist. >>> [EMAIL PROTECTED] 01/11/02 07:25AM >>> Hallo, why do I get the error message "No such file or directory". when I try to run unix script loadfiles.sh which is located in the directory /konto/tmp. This file, loadfiles.sh really exists in that directory. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jay Hostetter INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
The directory may not be in your PATH. try ./loadfiles.sh John > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: 11 January 2002 12:25 > To: Multiple recipients of list ORACLE-L > Subject: Unix question > > Hallo, > > why do I get the error message "No such file or directory". > when I try to run unix script loadfiles.sh which is located in > the directory /konto/tmp. > > This file, loadfiles.sh really exists in that directory. > > > Thanks in advance > > > Roland > > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: > INET: [EMAIL PROTECTED] > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California-- Public Internet access / Mailing Lists > > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: John Dunn INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Unix question
Check the first line in the script so that the path to the shell is correct. example: #!/bin/sh and maybe check the permissions on the file. /Patrik Malinen On Fri, 11 Jan 2002 [EMAIL PROTECTED] wrote: > Hallo, > > why do I get the error message "No such file or directory". > when I try to run unix script loadfiles.sh which is located in > the directory /konto/tmp. > > This file, loadfiles.sh really exists in that directory. > > > Thanks in advance > > > Roland > > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: > INET: [EMAIL PROTECTED] > > Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California-- Public Internet access / Mailing Lists > > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Patrik Malinen INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: unix question continue...
Sinardy schrieb: > > Hi all, > > But they other group will unable to read. > Like for example in DOS we can make our *.bat file to *.exe > changing the ascii (readable) to binary file. > Is this possible? > > thank you > > -Original Message- > Sent: Wednesday, 1 August 2001 12:25 PM > To: Multiple recipients of list ORACLE-L > > well u can use unix permissions, > > chmod 000 filename. > > then only the owner can change it back, but then no one can read it > either. :) > > joe > Sinardy wrote: > > > > Hi all, > > > > How make unix script and Oracle sql script not readable or chnageable, > > something like compile it into executable format > > > > Regards, > > > > Sinardy > > Hi, assuming that you created the file as user oracle, you can give just oracle the permission to read and execute the script (rx). A file containing a shell script has to be readable by the user that executes it. Only x doesn't work. If that doesn't do it for you, there are other options: You could replace your shell script with a perl script (there is a converter that converts awk and sed to perl). If your shell script uses alot of unix tools, you can convert it by hand to perl's system and exec commands. Might be alot of work, though. The final option is to use C (system()) instead of shell scripts. But to convert shell scripts into C is more than contra-productive ;) By the way, what is the reason for not letting others with the correct privileges reading the scripts ? | Regards, | | Stefan Jahnke | | @:D2 Vodafone, Abt.: FBOM | -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stefan Jahnke INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Unix question
this is ksh93 syntax (at least on Sun): 1453:oracle@e6500b> ksh1453:oracle@e6500b> var=tester1453:oracle@e6500b> echo ${var//e/o}ksh: ${var//e/o}: bad substitution 1453:oracle@e6500b> dtksh1453:oracle@e6500b> var=tester1453:oracle@e6500b> echo ${var//e/o}tostor1453:oracle@e6500b> -Original Message-From: Mandar Ghosalkar [mailto:[EMAIL PROTECTED]]Sent: Friday, March 23, 2001 8:05 PMTo: Multiple recipients of list ORACLE-LSubject: RE: Unix question check this question from korn faq at http://www.kornshell.com/doc/faq.html Q24. How do I do global substitutions on the contents of shell variables?A24. Use // instead of / for global substitution, ${var//aa/bb} willexpand to the value of with each "aa" replace by "bb". so i tried $ var=tester$ echo $vartester$ echo ${var//e/o}bad substitution$ anyone out there :) -Mandar -Original Message-From: Big Planet [mailto:[EMAIL PROTECTED]]Sent: Friday, March 23, 2001 7:56 PMTo: Multiple recipients of list ORACLE-LSubject: Unix question Hi geeks , How can I do substr and instr kind of operaion in unix shell script . is it possible ? like i have one paramter as "hostname" .. I want to trim quotes surrounding the hostname . One more question , is possible to read another text file line by line using a shel script and then edit that file . Actually I have this configuration file for my system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace with actual values at the time of installation by asking questions to the user. TIA --Big planet
RE: Unix question
The UNIX command "sed", "awk", and "tr" offer a world of solutions for altering text. Using Ksh93 you can do substringing. You can find it on Aix, and Sun system in the form of "dtksh". The syntax is: #!/usr/dt/bin/dtksh ...cut... myvar=${myvarin:startpos:length} ...rest... To edit a file on the fly use the old "edit" command. An example follows: 3925:oratst@marge> cat /tmp/abc bccc $HOSTNAME$.$SCHEMA$ 1223 3925:oratst@marge> 3925:oratst@marge> edit /tmp/abc <<\EOF > 1,$s/\$HOSTNAME\$/MYBOX/g > 1,$s/\$SCHEMA\$/MYSCHEMA/g > w > q > EOF "/tmp/abc" 3 lines, 110 characters MYBOX.$SCHEMA$ MYBOX.MYSCHEMA "/tmp/abc" 3 lines, 105 characters 3925:oratst@marge> 3925:oratst@marge> 3925:oratst@marge> cat /tmp/abc bccc MYBOX.MYSCHEMA 1223 3925:oratst@marge> 3925:oratst@marge> -Original Message-From: Big Planet [mailto:[EMAIL PROTECTED]]Sent: Friday, March 23, 2001 6:56 PMTo: Multiple recipients of list ORACLE-LSubject: Unix question Hi geeks , How can I do substr and instr kind of operaion in unix shell script . is it possible ? like i have one paramter as "hostname" .. I want to trim quotes surrounding the hostname . One more question , is possible to read another text file line by line using a shel script and then edit that file . Actually I have this configuration file for my system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace with actual values at the time of installation by asking questions to the user. TIA --Big planet
RE: Unix question
For single character replacement (or removal) use "tr". For string to string replacement use sed. echo $var | tr "e" "o" -or- echo $var | sed "s/e/o/g" # (the '/g' means globally) Mandar Ghosalkar <[EMAIL PROTECTED]> wrote: check this question from korn faq at http://www.kornshell.com/doc/faq.html Q24. How do I do global substitutions on the contents of shell variables?A24. Use // instead of / for global substitution, ${var//aa/bb} willexpand to the value of with each "aa" replace by "bb". so i tried $ var=tester$ echo $vartester$ echo ${var//e/o}bad substitution$ anyone out there :) -Mandar -Original Message-From: Big Planet [mailto:[EMAIL PROTECTED]]Sent: Friday, March 23, 2001 7:56 PMTo: Multiple recipients of list ORACLE-LSubject: Unix question Hi geeks , How can I do substr and instr kind of operaion in unix shell script . is it possible ? like i have one paramter as "hostname" .. I want to trim quotes surrounding the hostname . One more question , is possible to read another text file line by line using a shel script and then edit that file . Actually I have this configuration file for my system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace with actual values at the time of installation by asking questions to the user. TIA --Big planet Do You Yahoo!? Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
Re: Unix question
No No . Here is full problem I have this ini file called xyz.ini having hostname = $HOSTNAME$.acme.com schemaname=$SCHEMANAME$ domainname= $HOSTNAME$.foo.bar.com okay , Now I am getting the values of hosname as "abc" , schema name as "schem" . I want to write a script in which I will pass these parameters and they will do a search and replace kindof operation. I was thinking of using sed , but how to get rid of quotes because my $1 is "abc" so after replacement file will become hostname = "abc".acme.com schemaname="schem" domainname= "abc".foo.bar.com while I want it to be like hostname = abc.acme.com schemaname=schem domainname= abc.foo.bar.com - Big Planet - Original Message - From: Charlie Mengler To: Multiple recipients of list ORACLE-L Sent: Friday, March 23, 2001 8:45 PM Subject: Re: Unix question Yes & no. There are a couple of different way to solve the problem. 1) Write your own functions/filters to accomplish the desired operations 2) If the only place in the file where double quote marks exists are around the hostname and all you want to do is get rid of them, the "tr" command could be used. 3) Unix scripts can accept command line arguments which are positionally dependant so you could create a master script which would look like the following driver.sh host1 schemaA driver.sh host2 schemaB driver.sh host9 schemaG etc... The inside driver.sh where you want the hostname to appear place a $1 The inside driver.sh where you want the schema to appear place a $2 HTH & YMMV! Big Planet wrote: Hi geeks ,How can I do substr and instr kind of operaion in unix shell script . is it possible ?like i have one paramter as "hostname" .. I want to trim quotes surrounding the hostname .One more question , is possible to read another text file line by line using a shel script and then edit that file .Actually I have this configuration file for my system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace with actual values at the time of installation by asking questions to the user. TIA--Big planet
RE: Unix question
check this question from korn faq at http://www.kornshell.com/doc/faq.html Q24. How do I do global substitutions on the contents of shell variables?A24. Use // instead of / for global substitution, ${var//aa/bb} will expand to the value of with each "aa" replace by "bb". so i tried $ var=tester$ echo $vartester$ echo ${var//e/o}bad substitution$ anyone out there :) -Mandar -Original Message-From: Big Planet [mailto:[EMAIL PROTECTED]]Sent: Friday, March 23, 2001 7:56 PMTo: Multiple recipients of list ORACLE-LSubject: Unix question Hi geeks , How can I do substr and instr kind of operaion in unix shell script . is it possible ? like i have one paramter as "hostname" .. I want to trim quotes surrounding the hostname . One more question , is possible to read another text file line by line using a shel script and then edit that file . Actually I have this configuration file for my system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace with actual values at the time of installation by asking questions to the user. TIA --Big planet
Re: Unix question
Yes & no. There are a couple of different way to solve the problem. 1) Write your own functions/filters to accomplish the desired operations 2) If the only place in the file where double quote marks exists are around the hostname and all you want to do is get rid of them, the "tr" command could be used. 3) Unix scripts can accept command line arguments which are positionally dependant so you could create a master script which would look like the following driver.sh host1 schemaA driver.sh host2 schemaB driver.sh host9 schemaG etc... The inside driver.sh where you want the hostname to appear place a $1 The inside driver.sh where you want the schema to appear place a $2 HTH & YMMV! Big Planet wrote: Hi geeks ,How can I do substr and instr kind of operaion in unix shell script . is it possible ?like i have one paramter as "hostname" .. I want to trim quotes surrounding the hostname .One more question , is possible to read another text file line by line using a shel script and then edit that file .Actually I have this configuration file for my system which have keywords like $HOSTNAME$ , $SCHEMA$ which I want to replace with actual values at the time of installation by asking questions to the user. TIA--Big planet