Tab completion with a Unix Shell simulation

Hi everyone,
I am writing a command line program which needs to interface a Unix Shell.
when I type "!command", it will send the command to a bash process and read the output then write it on stdout.
The bash I am running merges stdout and stderr (exec 2>&1).
Everything works great, but now I would like to add the tab-completion functionality.
I would just need to send (tab) to the process so that I can read the output completion, I tried many ways but without success.
Also, I saw we can specify the tag for completion in file ~/.inputrc, but if my tag does not end with \n, I will write it in the buffer and we will be red by bash only after \n is typed.
I hope I made myself clear.
Thanks for your help!
Dimebag

That is the point.
I did try with out.write((char)9) twice followed by
flush(), however the data gets stuck in the buffer
and will only be received after the next command
(finishing with \n).
I would need to use println but this does not work
either.Ahh, I see...
According to this page (http://www.die.net/doc/linux/man/man1/screen.1.html), vt100 allows you to send 'ESC [ Pn I", or {(char)33, (char)91, (char)0, (char)73} as an escape code for the horizontal tab. I don't know if that will work either (never done terminal emulation), but it might be worth a shot.
As an aside, an alias for Bash's tab completion is a Control I, but I don't know what that translates to, if not the weird escape sequence above.

Similar Messages

  • [SOLVED]mplayer tab completion with *.divx files

    Hi,
    I have some *.divx files. mplayer plays them fine, but the tab completion in bash doesn't work. So I'll either have to type the filename or do something like vim <filename>, go back and write mplayer instead of vim. That's getting pretty annoying, so I hope someone can help me
    Last edited by rine (2008-09-17 00:02:47)

    I assume you use the bash_completition script.
    The easy way is to rename the file to the actual container (avi, mkv, mp4, wmv, whatever)
    The hard way is to patch bash_completition:
    you should add the extensions you like to line 5895: for example
    _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|divx)'

  • Issues with running UNIX shell command from Java

    Here is my java class file:
    create or replace and compile java source named host as
    import java.lang.* ;
    public class Host
       public static void cmdTest()
            String cmd = "ps -ef | grep orcl" ;
            int rc = 0 ;
            int = runCmd(cmd) ;
       public static int runCmd(String str )
           Runtime rt = Runtime.getRuntime() ;
           int     rc = -1 ;
          try
                Process p = rt.exec(str) ;
                int bufSize = 4096 ;
                BufferedInputStream bis =
                    new BufferedInputStream(p.getInputStream(), bufSize) ;
                int len ;
                byte buffer[] = new byte[bufSize] ;
                // Log what the program spit out
                while ((len = bis.read(buffer, 0, bufSize)) != -1)
                    rc = p.waitFor() ;
            catch (Exception e)
                e.printStackTrace();
                rc = -1 ;
            finally
                return rc ;
    show errorsI can call runCmd directly from SQLPlus using an Oracle stored procedure and it runs like expected. I can see the returned output using dbms_java.set_output(1000000).
    But when I call cmdTest from SQLPlus using an Oracle stored procecdure it just hangs forever and I have to kill the session.
    Is there something I am missing in the cmdTest method?

    Jimmy,
    If you haven't already seen it, I think the following article may be of help:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Also a "finally" block should not contain a "return" statement:
    http://weblogs.java.net/blog/staufferjames/archive/2007/06/_dont_return_in.html
    Good Luck,
    Avi.

  • Runtime.exec with a unix shell script

    I've done a lot of google'ing and haven't found a definitive answer to my question, including the JavaWorld article that is pointed to quite often. Scenario1 - The program calling Runtime.exec is running in /dir1 and I have a script called test.sh in /dir2 (neither directory are in the path). If I call Runtime.exec("test.sh", null, "/dir2"), I get java.io.IOException: test.sh: not found. However, if I do "touch test.sh" AND "chmod +x test.sh" in /dir1 and call the same exec, it works AND runs the script in /dir2 not /dir1?!?! Also, if I copy /dir2/test.sh /dir1/test.sh and I call exec("test.sh"), it works fine. Scenario2 - If I get rid of /dir1/test.sh and call exec("/dir2/test.sh", null, "/dir2") OR exec("/bin/sh test.sh", null, "/dir2") - both of those work. I just don't get Scenario1. Why does having the dummy executable test.sh in /dir1 allow it to run in /dir2 OR if the script is in the local directory of the process calling exec, why does it work without adding the path? It doesn't seem consistent. Seems like the working directory I specify isn't set before trying to run it or something. On the flip side, if I have a java class in /dir2 called test.class, I can call exec("java test", null, "/dir2") and it just runs without jumping through any hoops - although I think the explanation for that is that "java" is in the path. Let me know what you think.
    Gary

    I think the problem is that the three argument version of exec specifies the command to run (should be full path to it if it is not in the current dir), the environment, then the working directory. The working directory will not help java to find the command to run in the first place. The following does work as you say:
    Runtime.exec("/bin/sh test.sh",null,"/dir2");This is because the full path to the command (/bin/sh) is specified, that runs in directory /dir2 then tries to find test.sh which it finds there.
    Basically to run anything, you should specify the full path in the command, the working directory will not help java find it.
    Dave

  • Tab completion (complete-list) and pdksh

    There are (basically) two ways to get tab completion with pdksh. One is to use vi mode and 'set -o vi-tabcomplete'. The other is to 'bind ^I=complete-list'. They both do the same thing (the latter allows tab completion in emacs mode). But they both have the same issue -- they prepend a number before every entry. For example
    $ l
      1) /usr/bin/lacheck
      2) /usr/bin/lame   
      3) /usr/bin/last     
      4) /usr/bin/lastb
    I don't want that. I just want the name -- like:
    $ l
      lacheck
      lame   
      last     
      lastb
    This is how pdksh defaults to work on NetBSD. Is there a setting or option I'm missing to make this work in the manner I described?

    for the sake of accessing repos and things, i guess a text-mode browser is just as good so i am going to stick to that.

  • Tab completion in pacman?

    Hi, new Arch user here, just switch from Debian.
    I'm just wondering whether pacman has tab completion, so if I type pacman -S firef<tab> it'll complete as firefox. It was just a feature I found  convenient.
    Anyhow, Arch looks to be a fun adventure.

    Tab completion with pacman will work out of the box with zsh, for bash you will need to install the package 'bash-completion'.

  • Best approach -Tabs based ADF Tree left side navigation with Dynamic Regions with out UI Shell

    Hi,
    Somebody can help for the best approach to implement the following requirement.
    Req: When the user select the ADF Tree left side navigation menu, each menu will open as multiple tabs(Dynamic Tabs) in right side content area with out UI Shell Template.
    I completed the
    Step-1: From the Model project, I can able to render ADF Tree in the using view and view links. I can get the adf tree which is having 3 menu items. Each menu item having 2 sub menu's.
    I took each menu item as one(1) taskflow, each taskflow will have two(2) fragments.
    Total I have 3 task flows as Menu Items and 6 fragments for sub menu's.
    Step-2:  My question is How do I implement Tab based the ADF tree navigation (left side area to dynamic regions in content area) through dynamic regions? Please provide the steps in view layers.

    Than ks for your response.
    This is working fine for ADF Tree navigation with dynamic regions if the taskflow having only one fragment. if the taskflow having more than one fragments, this will not work. The following conditions are always satisfies one page fragment of either "employees" or "departments" task flow.  If the "employees" task flow have 2 page fragments, it's not work even you pass parameters through routers.
    public TaskFlowId getDynamicTaskFlowId() {
    if (currentTaskFlowID == null ||
    currentTaskFlowID.equalsIgnoreCase(“employees”)) {
    return TaskFlowId.parse(employeetaskFlowId);
    if (currentTaskFlowID != null &&
    currentTaskFlowID.equalsIgnoreCase(“departments”)) {
    return TaskFlowId.parse(departmetaskFlowId);
    return TaskFlowId.parse(employeetaskFlowId);
    My question is "Same use case with Dynamic Tabs" when the user click on any adf tree node.

  • How to run 3 job(a,b,c) parallel in unix shells script and after will complete d will start  and we have to handle the error also

    how to run 3 job(a,b,c) parallel in unix shells script and after will complete d will start  and we have to handle the error also

    032ee1bf-8007-4d76-930e-f77ec0dc7e54 wrote:
    how to run 3 job(a,b,c) parallel in unix shells script and after will complete d will start  and we have to handle the error also
    Please don't overwhelm us with so many details!  
    Just off the top of my head ... as a general approach ... something like
    nohup proca
    nohup procb
    nohup procc
    while (some condition checking that all three procs are still running ... maybe a ps -ef |grep  )
    do
    sleep 2
    done
    procd
    But, we'd really need to know what it is you are really trying to accomplish, instead of your pre-conceived solution.

  • Post your fish-shell tab completion scripts here

    Fish shell is not really active nowadays, tab completion scripts are aging and many are missing. Let's fill the gap by collecting our autocompletion scripts here. I start first with a patch to pacman.fish:
    55c55
    < complete -c pacman -n '__fish_contains_opt -s A -s F -s U' -a '(__fish_complete_suffix pkg.tar.gz)' -d 'Local package'
    > complete -c pacman -n '__fish_contains_opt -s A -s F -s U' -a '(__fish_complete_suffix pkg.tar.xz)' -d 'Local package'
    and here is bauerbill.fish:
    # Completions for bauerbill, using short options when possible
    # Based on Giorgio Lando's pacman.fish
    # Primary operations
    complete -c bauerbill -s A -f -n '__fish_not_contain_opt -s F -s U -s Q -s R -s S -s h' -d 'Add a package to the system'
    complete -c bauerbill -s F -f -n '__fish_not_contain_opt -s A -s U -s Q -s R -s S -s h' -d 'Upgrade a package which is already in the system'
    complete -c bauerbill -s U -f -n '__fish_not_contain_opt -s A -s F -s Q -s R -s S -s h' -d 'Upgrade or add a package in the system'
    complete -c bauerbill -s Q -f -n '__fish_not_contain_opt -s A -s F -s U -s R -s S -s h' -d 'Query the package database'
    complete -c bauerbill -s R -f -n '__fish_not_contain_opt -s A -s F -s U -s Q -s S -s h' -d 'Remove packages from the system'
    complete -c bauerbill -s S -f -n '__fish_not_contain_opt -s A -s F -s U -s Q -s R -s h' -d 'Synchronize packages'
    complete -c bauerbill -o V -f -d 'Display version and exit'
    # General options
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s Q -s R -s S -s U' -s d -d 'Skips all dependency checks'
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s Q -s R -s S -s U' -s f -d 'Bypass file conflict checks'
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s Q -s R -s S -s U' -s r -d 'Specify an alternative installation root'
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s Q -s R -s S -s U' -s v -d 'Output more status messages'
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s Q -s R -s S -s U' -l config -d 'Specify an altenate config file'
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s Q -s R -s S -s U' -l noconfirm -d 'Bypass any question'
    complete -c bauerbill -s h -f -d 'Display syntax and help for the operation'
    # Query options
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s c -d 'View the changelog of a package'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s g -d 'Display all packages in the group'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s o -d 'Search for the package that owns file'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s e -d 'List orphan packages'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s m -d 'List all packages which are not in the sync database'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s u -d 'List all out of date packages in the system'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s s -d 'Search each locally installed package for regexp'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s i -d 'Display information on a given package'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s l -d 'List all files owned by a given package'
    complete -c bauerbill -n '__fish_contains_opt -s Q' -s p -d 'Apply the query to a package file and not to an installed package'
    # Remove options
    complete -c bauerbill -n '__fish_contains_opt -s R' -s c -d 'Remove also the packages that depends on the target packages'
    complete -c bauerbill -n '__fish_contains_opt -s R' -s k -d 'Remove the database entries only'
    complete -c bauerbill -n '__fish_contains_opt -s R' -s n -d 'Ignore file backup designations'
    complete -c bauerbill -n '__fish_contains_opt -s R' -s s -d 'Remove also the dependencies of the target packages'
    # Sync options
    complete -c bauerbill -n '__fish_contains_opt -s S' -s c -d 'Remove old packages from the cache; if iterated, remove all the packages from the cache'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s e -d 'Install only the dependencies of the target packages'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s g -d 'Display all packages in the group'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s i -d 'Display informations for the target package'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s l -d 'List all packages in the repository'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s p -d 'Display URIs for target packages and dependencies'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s s -d 'Search packages and descriptions in the repos for regexp'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s u -d 'Upgrade all packages that are out of date'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s w -d 'Only download the target packages'
    complete -c bauerbill -n '__fish_contains_opt -s S' -s y -d 'Download a fresh copy of the master package list from the servers'
    complete -c bauerbill -n '__fish_contains_opt -s S' -l ignore -d 'Ignore upgrades of the target packages'
    complete -c bauerbill -n '__fish_contains_opt -s S' -l noprogressbar -d 'Do not show a progressbar when downloading files'
    # Complete with local packages
    complete -c bauerbill -n '__fish_contains_opt -s A -s F -s U' -a '(__fish_complete_suffix pkg.tar.xz)' -d 'Local package'
    # Complete with installed packages
    complete -c bauerbill -n '__fish_contains_opt -s Q -s R' -a '(pacman -Q | cut --delim " " --fields 1)' -d 'Installed package'
    # Complete with packages in the repos
    complete -c bauerbill -n '__fish_contains_opt -s S' -a '(pacman -Sl | cut --delim " " --fields 2 | sort)' -d 'Repo package'
    # Bauerbill specific switches
    complete --command bauerbill --condition '__fish_not_contain_opt aur' --long-option aur --description 'Compile package using the Arch User Repository'
    complete --command bauerbill --condition '__fish_not_contain_opt abs' --long-option abs --description 'Recompile package using the Arch Build System'

    duply.fish
    # Completions for duply
    # Author: SanskritFritz (gmail)
    # First parameter is the profile name, or 'usage'
    complete --command duply --no-files --condition '__fish_is_first_token' --arguments '(/bin/ls /etc/duply ^/dev/null) (/bin/ls ~/.duply ^/dev/null)' --description 'Profile'
    complete --command duply --no-files --arguments 'usage' --description 'Get usage help text'
    # Second parameter is a duply command
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'create' --description 'Creates a configuration profile'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'backup' --description 'Backup with pre/post script execution'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'bkp' --description 'Backup without executing pre/post scripts'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'pre' --description 'Execute <profile>/pre script'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'post' --description 'Execute <profile>/post script'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'full' --description 'Force full backup'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'incr' --description 'Force incremental backup'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'list' --description 'List all files in backup (as it was at <age>, default: now)'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'status' --description 'Prints backup sets and chains currently in repository'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'verify' --description 'List files changed since latest backup'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'purge' --description 'Shows outdated backup archives [--force, delete these files]'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'purge-full' --description 'Shows outdated backups [--force, delete these files]'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'cleanup' --description 'Shows broken backup archives [--force, delete these files]'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'restore' --description 'Restore the backup to <target_path> [as it was at <age>]'
    complete --command duply --no-files --condition 'not __fish_is_first_token' --arguments 'fetch' --description 'Restore single file/folder from backup [as it was at <age>]'
    # Options
    complete --command duply --no-files --long-option force --description 'Really execute the commands: purge, purge-full, cleanup'
    complete --command duply --no-files --long-option preview --description 'Do nothing but print out generated duplicity command lines'
    complete --command duply --no-files --long-option dry-run --description 'Calculate what would be done, but do not perform any backend actions'

  • Schedule workbook using with Unix shell script

    Hi,
    Can we schedule workbook using with Unix shell script?
    Thanks,
    Jay

    I can't imagine how.
    1. You can schedule Disco workbooks via Disco itself.
    2. You can schedule Disco workbooks to run and output in different file formats automatically via batch scheduler in Windows running Disco Desktop directly (or can user VBasic).
    3. You can schedule Disco workbooks to run and output in different file formats automatically via a Java program running the Java Command Line interface.
    Moving forward, Oracle has announced that with a further interfacing of Disco with XML Publisher, you'll be able to use Oracle Apps concurrent manager and scheduling. But that's coming supposedly at the end of this year.
    And I think that's about it.
    Russ

  • Starting Unix shell command with 7.3.4

    Hallo,
    does anybody have a easy to use solution to start an
    Unix shell command with Oracle 7.3.4 ????
    Thanx

    found on metalink :
    Certify - Certification Matrix: Oracle Server - Enterprise Edition on HP Tru64 UNIX
    Server Certifications
    OS        Product Certified With Version Status Addtl. Info. Components Other
    5.1b 8.1.7   (8i) 64-bit N/A N/A Certified Yes None None
    5.1a 8.1.7   (8i) 64-bit N/A N/A Certified Yes None None
    5.1 8.1.7    (8i) 64-bit N/A N/A Certified Yes None None
    5.0a 8.1.7   (8i) 64-bit N/A N/A Certified Yes None None
    5.0 8.1.7    (8i) 64-bit N/A N/A Desup:OS Yes None N/A
    4.0f-g 8.1.7 (8i) 64-bit N/A N/A Certified Yes None None
    4.0d-e 8.1.7 (8i) 64-bit N/A N/A Desup:OS Yes None N/A --------------------------------------------------------------------------------
    Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.

  • Why do new tabs open with completely different websites to what I am on when I click on any links on whatever site I am on in safari?

    Why do new tabs open with completely different websites to what I am on when I click on any links on whatever site I am on in safari?

    From your Safari menu bar click Safari > Preferences then select the General tab.
    Click the pop up menu next to; New tabs open with
    Select:  Same Page

  • Simulating a UNIX shell

    I have this code in my program right now:
    try
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("javac");
         InputStream stderr = proc.getErrorStream();
         InputStreamReader isr = new InputStreamReader(stderr);
         BufferedReader br = new BufferedReader(isr);
         String line = null;
         System.out.println("<ERROR>");
         while ( (line = br.readLine()) != null)
                   windows.Pan.txt.setText(windows[i].Pan.txt.getText()+"\n"+line);
         System.out.println(line);
         System.out.println("</ERROR>");
         int exitVal = proc.waitFor();
         System.out.println("Process exitValue: " + exitVal);
         } catch (Throwable t)
              t.printStackTrace();
    the line. Process proc = rt.exec("javac");, cause the program to output everything that would normally come up when you type javac into a UNIX shell. The problem I am having is with other commands. For example, if I type the command "java" or "ls", it says that the output is null even though it produces output in a normal UNIX shell. Thanks in advance.

    Use the following code as basis so that stdout goes to to a JTextArea and the input lines come from a JTextFieldd. Remember to use SwingUtilities.invokeLater() when writing to the Swing data models.
    import java.io.*;
    public class Fred117_1
        public static String CVS_VERSION = "$Revision: 1.3 $ $Id: Fred117_1.java,v 1.3 2007/03/23 12:52:03 sabre Exp $ ";
        static class AsyncPipe implements Runnable
            public AsyncPipe(InputStream istrm, OutputStream ostrm)
                istrm_ = istrm;
                ostrm_= ostrm;
            public void run()
                try
                    final byte[] buffer = new byte[1024];
                    for (int length = 0; (length = istrm_.read(buffer)) != -1;)
                        ostrm_.write(buffer, 0, length);
                catch (Exception e)
                    e.printStackTrace();
            private final OutputStream ostrm_;
            private final InputStream istrm_;
        public static void main(String[] args) throws Exception
            final boolean isWindows = System.getProperty("os.name").startsWith("Windows");
            final String LINE_SEPARATOR = System.getProperty("line.separator");
            final Process process = Runtime.getRuntime().exec(isWindows ? "cmd.exe" : "sh");
            new Thread(new AsyncPipe(process.getErrorStream(), System.err)).start();
            new Thread(new AsyncPipe(process.getInputStream(), System.out)).start();
            final Writer writer = new OutputStreamWriter(process.getOutputStream(), "UTF-8");
            final String[] shCommands =
                "ssh alpha",
                "df -k",
                "ls",
            for (String shCommand : shCommands)
                System.out.println(shCommand);
                writer.write(shCommand);
                writer.write(LINE_SEPARATOR);
            writer.close();
            final int returnCode = process.waitFor();
            System.out.println("Return code = " + returnCode);
    }

  • Executing Unix shell scripts with DBMS_SCHEDULER

    I have the following Unix shell script create_backup_file.sh:
    #!/usr/bin/ksh
    /usr/bin/ssh [email protected] /usr/bin/touch/app_home/home/trotestbat/scripts/TRO_batch_complete_`date +%d-%m-%Y-%H%M`
    If I execute this from the command prompt it creates the file on the remote server.
    I've used dbms_scheduler to try and execute this from Oracle:
    BEGIN
    SYS.DBMS_SCHEDULER.CREATE_PROGRAM
    program_name => 'CREATE_TRO_BACKUP_FILE'
    ,program_type => 'EXECUTABLE'
    ,program_action => '/APP/TORPEDO/DTE/SCRIPTS/create_backup_file_tro.sh'
    ,number_of_arguments => 0
    ,enabled => TRUE
    ,comments => NULL
    SYS.DBMS_SCHEDULER.CREATE_JOB
    job_name => 'DTE.TESTAGAIN'
    ,start_date => TO_TIMESTAMP_TZ('2010/05/17 16:09:24.710789 +01:00','yyyy/mm/dd
    hh24:mi:ss.ff tzh:tzm')
    ,repeat_interval => NULL
    ,end_date => NULL
    ,program_name => 'DTE.CREATE_TRO_BACKUP_FILE'
    ,comments => NULL
    END;
    The problem I have is that scheduler executes the shell script and creates the file but it never completes the job. The status of the job is permanently 'RUNNING'. Why is the scheduler not returning a completed status?

    the "infinite" script is usually caused by a prompt (script pauses for a user input).
    Please keep in mind that executing script via scheduler is not the same as manually via prompt.
    1. the script runs as ORACLE user ID (or whatever you specified using DBMS_SCHEDULER.create_credential or/and "$ORACLE_HOME/rdbms/admin/externaljob.ora")
    2. the environment variables are probably not the same.
    My wild guess is that you never ran SSH using "oracle" UID and thus it prompts for permission to add the remote computer’s fingerprint to the user’s ~/.ssh/known_hosts file - since it is a script, it just hangs and waits for input.
    Did you try to login to unix box as oracle uid and run the script manually?

  • Unreadable Vim tab completion bar with default colorscheme in console

    Hi,
    I am talking about the bar in Vim that shows up when I type, for example, ":colorscheme <Tab>".
    When using the default color scheme, a dark background and t_Co=8 in the console, this bar is light gray on white, which is barely readable.
    I have this in my .vimrc:
    if &term=~'linux'
    set t_Co=8
    set background=dark
    else
    set t_Co=256
    set background=light
    endif
    Though when in X, I can manually set t_Co=8 and background=dark and the tab completion bar has high contrast, i.e. black on white. (Obviously, for this test I set my terminal background color to black.)
    Last edited by LovelyAlien (2011-11-07 12:17:28)

    frabjous wrote:
    Try opening the file with:
    vim -u NONE filename.tex
    (This will disable your .vimrc and other scripts from loading for the session.)
    ....and see if it's slow then.
    Thanks for the reply.
    Hmm.. Indeed, by doing something like that to the same .tex file, vim is fully responsive.
    So it seems that the .vimrc is 'causing all that. I guess that I should start commenting
    out things in the .vimrc until I see where the problem is...

Maybe you are looking for