grep -v try file
will give you all the lines which do not contain try
cat file|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
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
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
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
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
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
USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE
WITH CARE.USE WITH CARE.
COUNT=`ls -lrt dir/name|wc -l`
if [ $COUNT -ge 4 ] ;
then
find dir -name name -mtime +4 -exec rm -f {} \;
fi
USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE
WITH
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
-- 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
: 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
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
-- [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
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
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
-- 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
: 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
-- 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
-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
-- 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
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 extractionof $PWD is ksh
specific. You could do it other ways, but this way
, August 26, 2002 10:03
AMBRBTo:/B Multiple recipients of list ORACLE-LBRBSubject:/B Re:
Unix question: how to display SID and path in promptBRBR/FONT/DIV
DIVFONT face=Arial size=2Put $PWD in there somewhere. I use
${PWD#${PWD%%*([!/])/*([!/])}} to display the last two directory levels, so my
-- 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
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
/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
-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
-- 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
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
-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
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
-- 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
[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
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
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
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
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
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
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
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
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
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
-- [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
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
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
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
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
-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
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
"
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
48 matches
Mail list logo