Unix and grep

I have the standard 10.6.4 installation and I'm using the Unix command line.
I am experiencing anomalies with grep.
According to grep -V, I have version 2.5.1. The man page identifies this as gnu grep, and says it is identical in functionality to egrep. This is not my experience.
I must specify egrep in order to get character class function, and, most puzzlingly, I do not have POSIX class ( eg. [:digit:], [:alpha:], etc.) function at all (egrep or no).
I know grep 2.5.1 is not the most recent version, but the man page says that these things should be available.
Anyone have any information on this?
Thanks in advance.

Thanks for your reply.
Your illustrated response solved my problem: I did not know that the POSIX expression must itself be nested within another set of brackets. The grep man page does point this out. I missed it.
I remain puzzled as to why the man page is the only place I have yet encountered which mentions this (apart from your post, of course); I have been using O'Reilly's Grep Pocket Reference, and see no guidance to that effect. On the contrary, there are examples given in the book that clearly show a single set of brackets and say that this is the way to do it.
I'm not sure the other responders got the gist of my question. I am aware of differences in implementations. But the man page specifically says that gnu grep behaves as egrep with regard to regexes; it also identifies the default Mac grep as gnu grep. Hence my confusion about grep on the Mac.
Thanks again, GCW

Similar Messages

  • Using Oracle driver in JDBC for Unix and Linux based servers

    Please, let me know how to mention the Oracle driver within the forName.class(" "); statement in the Jdbc-Servlet for Unix and Linux based servers.
    I'm using Windows-OS for Java programming. Should I have to use the same environment(Unix/Linux with Oracle) for compiling or just compiling, mentioning the driver in the java program would suffice?
    Please, Help me.
    Thank You.
    from,
    Silas eschole.
    email: [email protected]
    [email protected]

    I've used Oracle's thin driver like this:
    Class.forName ( "oracle.jdbc.driver.OracleDriver" );
    Connection DBConnection = DriverManager.getConnection("jdbc:oracle:thin:USER/PASSWD@database" );
    You need Oracles client classes ( e.g. classes111.zip ) at run time, not during compilation.
    Thin client connects directly to the Oracle DB, so the database description is like PORT:MACHINE:SID
    Connection is made through Oracle's listener even when your DB is in the same machine that your program is running. Port number is propably 1521 or 1526, depending on your listener.ora definitions and used Oracle SQL*Net version.

  • Dial Up between Oracle on HP-Unix and Oracle on Windows 95

    Hello Everybody
    I have Oracle Enterprise edition 8.0.4 on HP-Unix and Personal
    Oracle 8.0.3 on Windows 95. I want to establish connection
    between these two databases through dial-up. I have already
    established connectivity through lease line.
    I can dial up through Windows machine but I am not able to dial
    up through HP-9000 server. Please can anybody guide me. I will be
    highly obliged.
    Thanks in advance.
    Noble.
    null

    Noble,
    This is not the best forum for this question.
    Maybe the public news forums would be better,
    or Oracle support if it is available to you.
    My comments would be:
    Oracle has the async v1 and v2 protocol for doing this,
    but your best bet is to set up a tcp/ip ppp connection, as used
    by 200 million internet users..
    This may raise some security concerns, but dialling back to the
    server trying to make the connection, as well as the normal
    password protection gives some security comfort.
    Information on how to do this should be widely available as it is
    not Oracle or windows or hp specific.
    You can then use a normal tcp/ip connection database link etc..
    Turloch
    Oracle Migration Workbench Team
    Noble (guest) wrote:
    : Hello Everybody
    : I have Oracle Enterprise edition 8.0.4 on HP-Unix and Personal
    : Oracle 8.0.3 on Windows 95. I want to establish connection
    : between these two databases through dial-up. I have already
    : established connectivity through lease line.
    : I can dial up through Windows machine but I am not able to dial
    : up through HP-9000 server. Please can anybody guide me. I will
    be
    : highly obliged.
    : Thanks in advance.
    : Noble.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • File permissions $OH Unix and Windows

    Hi,
    I am examining an Oracle audit and now looking for all the default file/directory permissions on Unix and Windows. Have searched a lot of sites now but could not find a proper list with all the permissions mentiond. Does anybody knows where to find such a list (or script) to check if my current settings are ok?
    I use OEM to check for my open security policies but this permission item is very hard to find unfortunately.
    So please some info on this unix/windows permissions issue.
    Thanks,
    Paul
    btw Have found some settings for bdump, udump, adump, $OH/rdbms/log and audit (umask 0177) but want to check those other permissions for the whoe installed Oracle software en admin directories.
    Edited by: Paul van Rixel on 12-mei-2009 13:30

    Hi,
    Picked a few alerts from EM, for example:
    Allowed Logon Version
    Default Passwords
    Default Permanent Tablespace Set to a System Tablespace
    Initialization Parameter File Permission
    The last few weeks I have already disabled some of the policies but these are the alerts which are left now and I want to get rid of them.
    When you click in EM on "Initialization Parameter File Permission" the description of it is: Ensures that access to the initialization paramater file is restricted to the owner of the Oracle software set and the DBA group.
    So, ok thats is clear to me but I want to look at the whole server/database to make it a "clean" server/db.
    Paul

  • Essbase system 9 -difference between the installation in UNIX and windows

    Hi,
    plz let me know the difference in installation in UNIX and windows, let me know the process. this is bit ugent...
    advanced thanks for your help and support.
    Thanks,
    sudhakar

    Hi Sudhakar,
    You have 2 documents for windows_installation and unix_installatio in the following location.
    http://download.oracle.com/docs/cd/E10530_01/doc/nav/portal_1.htm
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • Execute command on UNIX and get the result

    I want to write a Java program, which can execute a shell script in UNIX and get back the result. Any idea?

    Check these two tips:
    How to execute a command from code
    http://www.java-tips.org/java-se-tips/java.lang/how-to-execute-a-command-from-code.html
    How to read output from a Command execution
    http://www.java-tips.org/java-se-tips/java.lang/how-to-read-output-from-a-command-execution.html

  • Export from HP-unix and import on solaris

    Hi all,
    Can anyone give me the procedure and constraints that are taken for exporting oracle 8i on HP-unix and importing on oracle 9i Solaris machine, Any docs or metalink notes also helps me
    what are the parameters that should taken for faster export and import ...
    export is for full database ..
    If anyone can give me a quick response , i would appreciate that. because i have only 2 days in hand...
    Thanks in advance

    The export and import commands are documented in the Database Utilities manual for whatever version you are running. They work the same on both OSs
    Description of your requirement will help get a better response - it almost sounds like you want to migrate, but ...
    in general, the syntax is
    exp|imp user/password@db file=export_file.dmp parameters-list
    exp help=y
    imp help=y
    give a decent summary of the parameters. You can keep them in a parameters file if this needs to be reproduced.
    One thing - don't use 'compress=y' ... it tries to plunk each segment into it's own single extent, and that is often fatal.

  • Exporting  from Hp-unix and Importing on Solaris

    Hi all,
    Can anyone give me the procedure and constraints that are taken for exporting oracle 8i on HP-unix and importing on oracle 9i Solaris machine, Any docs or metalink notes also helps me .
    And i need steps like how to disable the constraints and triggers and how to take take export. what precautions are taken while exporting and importing.
    what are the parameters that should taken for faster export and import ...
    export is for full database ..
    If anyone can give me a quick response , i would appreciate that. because i have only 2 days in hand...

    Hi,
    I dont think that cross platform with work in exp/imp u can give a try anyway.
    Take export in direct path tat would be faster if you are using 10G then use Datapump (expdp/impdp)
    Before u could use exp or expdp / imp or impdp login as oracle use and export the variable ORACLE_SID to the target database
    do this $ exp help=y (for export) or imp help=y (for import)
    E.g. export syntax
    EXPORT
    exp parfile=exp.par
    parfile (exp.par)
    userid="/ as sysdba"
    file=/path/filename.dmp
    log=/path/filename.log
    direct=y
    constraints=n
    triggers=n
    full=y (for full export)
    owner=user1,user2(for schema level export)
    IMPORT
    imp parfile=imp.par
    parfile (imp.par)
    userid="/ as sysdba"
    file=/path/filename.dmp
    log=/path/impfilename.log
    full=y (for full import)
    fromuser=username (for schema level import)
    touser=username
    Try in google search for syntax of otn site for good documents
    Cheers,
    Kamalesh JK

  • Policy Routing - Unix and MS (Dare I ask?)

    Guys,
    Need to route out of a dual homed Unix and Windows box based on the source address or source interface as not to follow the default route.
    ie, Packet arrives at host x on interface eth0 but the default route is out of eth1 so I get assemetric packet forwarding on the box.
    I think ipfw is the way to policy route on unix, but anyone got a plan for windows?
    Many thx indeed, and kind regards,
    Ken

    The standard action, as performed by router software (such as Cisco IOS), is to select the next hop address and the output device. I will refer to this action as a "match & set" style of action. However, Linux takes a much more flexible approach. In Linux, there are several actions to choose from. The default action performs a route lookup from a specified destination-based routing table. The match & set action then becomes the simplest case of Linux route selection, which is realized when the specified destination-based routing table contains only a single default route. Linux supports multiple routing tables, containing multiple standard destination routes. Bear in mind that each of these routing tables is the same as the entire routing table for any other OS. Linux effectively provides 255 Ciscos to choose from. (For number freaks, Linux 2.2.12 supports 255 routing tables, 255 aggregate realms, and 232 (4294967296 decimal) policy rule priorities.

  • Unix and Java

    Hey guys, im taking a computer programing class this semester and i was wondering if anyone has tried running Unix and Java OS on their macs? Im going to be writing my own programs for the class, such as creating a ball in a window and making it bounce etc. So far i been using my school computers and i was wondering how macs are?

    You can't run OS X without running Unix Strictly speaking, 10.4 (Tiger) isn't a certified Unix, so you may find a couple of non-standard things, but 10.5 (Leopard) will be certified.
    There are a ton of Java developers who work on Macs, so it's as good a platform as any for Java development. Apple are always a bit behind the official JDK releases because they produce their own rather than using Sun's, though. As for development tools, Apple's Xcode, Sun's Netbeans and IBM's Eclipse all work just fine on Macs-- although to be honest you shouldn't need much more than a decent text editor if you're just taking an elementary programming class.

  • Connect to Unix and load files

    Can I connect to Unix and load files without using agent on Unix?
    what I mean to connect directly to unix to load file from unix to Oracle database without using any agnets on Unix just by using server username and password
    Please help !!!
    Edited by: user653098 on Sep 5, 2010 11:45 AM

    One way i can think of is if the Files are in the same Server where the ODI Server . Launch the ODI Designer of the Server(using VNC or any other application ) and use the Local agent to load the data from Unix to database. Other than this you would need to have an Agent to communicate from your Client windows Machine and Unix box.

  • Is it possible to create a web page to launch Reflection for UNIX and Digital program using Dreamweaver CS6?

    I am planning to create a web page that could launch Reflection for UNIX and Digital program as part of my project in my working area.
    Is this possible?
    I am a beginner in using DW. I am still studying how to properly use Dreamweaver thinking that I could provide the requirement of my project.
    Thank you for your comments.

    This is a question for Attachmate, the maker of Reflection, not Adobe, the maker of Dreamweaver.
    Dreamweaver is a tool, not a technology. It builds applications using HTML and Javascript that run on web servers using the HTTP protocol. So I think the question to as Attachmate is:
    Can Reflection be launched from an apache webserver using HTML, PHP or Javascript?

  • Learning Unix and AppleScript on Lion

    Hi everyone,
    I want to learn Unix on OS X Lion and AppleScripts very well. I've been a Mac user since Tiger OS X, but now I've decided to be serious about Unix and AppleScript. Can anybody recommend good books for this purpose. I would like to have books which start from basics but later go on to great details to fully explore these two things. I really need expert opinion here, plz.
    Best,
    Naveen

    If you already know something about unix commands, there is a scripting tutorial at http://www.tldp.org/LDP/abs/html/index.html
    If you need a tutorial on unix commands, http://osxfaq.com/Tutorials/LearningCenter/UnixTutorials/LoseTheMouse/index.ws had a pretty good tutorial, although at the moment, that link isn't loading for me now so I don't know if it is still up online or not.
    for creating logout hooks, http://www.bombich.com/mactips/loginhooks.html might help.
    Also, in Terminal, type man launchd.plist if you can think of a scenario where you could implement a "cron-like" solution. Then refer to Apple's own periodic daily/weekly/monthly launchd plists (com.apple.periodic-*ly.plist) at/System/Library/LaunchDaemons/. There are more triggers available than just day/date/time, such as "watchPaths" and "RunAtLoad." Home grown launchd plists ones should go in /Library/LaunchDaemons/ or Library/LaunchAgents, not /System/Library/LaunchDaemons/. Also man launchd (no ".plist").

  • Currency symbol  different in unix and windows

    I am using NumberFormat.getCurrencyInstance() passing a bigdecimal to call format method , the output is different in unix and windows , in windows it works fine the result is $0.00 where as in unix I get this 0.00
    please explain me how to resolve this ? code to format bigdecimal
         NumberFormat.getCurrencyInstance().format(new BigDecimal(0));

    My guess is your unix doesn't have the locale set right. If you are US try this.
    NumberFormat.getCurrencyInstance(Locale.US).format(new BigDecimal(0));JSG

  • A Unix question: grep command

    Hi all,
    I have a directory which contains more directories, and each directory has more directories inside, which in turn may or may not contain Java files. I need to use the grep command in the way that from the first directory goes into the directories recursively, finds the Java files and tell me what files have the PATTERN= "Basic Import Validation".
    I used the grep like this, but guess its wrong since haven't received any response so far. Can sb. please tell me if I've used the command correctly or how should I change it? Any help is greatly appreciated.
    dir> grep -r --include="Basic Import Validation" *.java                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I gues the reason this isn't working for you isthat
    -r means "process all subdirectories of any
    directories listed in the command line args."
    grep never sees the *.java that you supply. Theshell
    grabs that and expands it to list all the .javafiles
    in the pwd.If you can, would you please explain a little more,
    what you meant by above?
    grep whatever *.java When you type that command, your shell (bash, zsh, ksh, tcsh, etc.) is the program that receives that string on its standard input--like Java's System.in. The shell sees *.java and expands it into a list of all the .java files in the current directory. Then the shell invokes grep, and passes on the list of those java files.
    But the list of .java files in the pwd has nothing to do with any java files that might be in subdirs.
    If you use the -r arg, it seems that, in the list of "files" (where you put *.java), if any of those "files" are in fact directories, then -r means to look in files in that dir and its subdirs, rather than treating that arg as a file to examine.
    So you'd put . (dot) as your current dir, and then use the --include to tell grep which files to process and which to ignore.
    I'm sure about the shell expanding *.java. I'm not completely sure about my interpretation of -r and --include, but I'm pretty confident that's right.
    As you said, the way I used grep, didn't return any
    result. Your solution however, gave me results and
    found the Java files containing the PATTERN. Thanks a
    lot.You're welcome.
    If you're still interested, it's probably worth trying out my slight modification to your original solution. If it works, it's a bit cleaner and simpler.

Maybe you are looking for

  • Server monitor not working

    Guys, I have server monitor installed on a 10.5.8 client mini to monitor our 9 xserves and it works fine on all the older ones (all G4 or G5 xserves running tiger or panther) but will not detect any of the 4 new Intel Xeon xserves running 10.5 (mixtu

  • Sync cant be done because of failed connection to the server

    Hello! I surf Internet via proxy (in my corporate network). This proxy need password protected auth. I provided my pass to Firefox and now can surf Internet well, but when I am trying to sync my data (with embedded sync tool) there appears error "syn

  • The Best Releas Of Oracle Application Server 10g (BI Forms&Reports)

    hi all i am asking u to loock with me to the best solution for my environment becuse we want to upgrade our Environment work : Current Work Environment: - Oracle Database Server R 8i as (database) - Oracle Developer 2000 as (Forms & Reports) our comu

  • PSD images in PSE 13

    Just downloaded PSE 13.  Preview images in files are showing as white sheet paper.  How do I fix this?

  • Mapping new product code from source system to old product code in Oracle COA

    Mapping new product code from source system to old product code in Oracle COA Here is the situation: One of our legal entities is changing their product codes in their COA segment. We are not changing the code structure in the global SOB. Is there a