Run command after current command finishes?

I use zsh, but bash-compatible would be nice.
I know I can do command1 && command2.
Is it possible to start command1, realise it's going to take a while to complete, but specify a job to run immediately after it finishes (presumably successfully)?
i.e., I want to run command1 && command2, at the point that I've started command1 on its way and forgot I wanted to specify command2.
Or is this not possible?
Thanks guys.

karol wrote:
brisbin33 wrote:
i still think he wants command2 to wait for command1 to finish.  i'd use similar job control plus a small function (which could live in bashrc if you do this sort of thing often):
//blue/0/~/ when_done() { while true; do ps $1 &>/dev/null || return 0; done; }
//blue/0/~/ sleep 20
^Z
[1]+ Stopped sleep 20
//blue/148/~/ bg
[1]+ sleep 20 &
//blue/0/~/ jobs -l
[1]+ 30771 Running sleep 20 &
//blue/0/~/ when_done 30771 && echo 'command2'
[1]+ Done sleep 20
command2
//blue/0/~/
But it's tied to a PID, so if command1 actually means 'commandA && commandB', that will fail, won't it?
/edit:
I think you're right; after some CLI testing, it seems both my over-complicated way and Procyon's identical simpler solution (I misread his initially ) will fail in the case of two initial commands.
//blue/0/~/ sleep 10 && sleep 10
^Z
[1]+ Stopped sleep 10
//blue/148/~/ fg; echo yay
sleep 10
yay
but i don't think that was the original question, was it?
Last edited by brisbin33 (2010-09-07 17:07:31)

Similar Messages

  • Periodic Background Jobs after another Job finishes

    Hi
    I have to schedule a job 'B' to run after job 'A' finishes.
    When i schedule job 'B' to run after job A , it runs only once , while i need the job B to run periodically after job A finishes.
    1) I cannt make job B as step 2 of job A , because job A is not scheduled by me and i cannt change that.
    Can anyone tell me how to i trigger the job B periodicaly after job A finishes .
    Any solution or hint would be appreciated.
    Looking forward to some helpful replies from the gurus of SAP.
    Regards
    Purva

    Dear Team,
    Job ES_RPTMC_CREATE_CHANGEPOINT_AUTH  ran only once where as SEC:INDX_UPDATE_FOR_STRUCT_AUTHS ran daily.
    CAUSE:
    “The start condition "Start after job" is internally mapped by means of "Start after event SAP_END_OF_JOB with the parameter <Jobname><Jobcount> of the predecessor". The pair <Jobname><Jobcount> is the unique key for a job.
    If a job is executed periodically, the SAP_END_OF_JOB event is always triggered with different parameters.
    The successor in turn waits for SAP_END_OF_JOB with just one particular parameter (this is the parameter with <Jobname><Jobcount> from the first predecessor). When the successor is rescheduled, the key fields from the next predecessor must therefore always be known in advance, something which is not always technically possible.”
    SOLUTION:
    This task can be completed with the new ABAP program Program  BTC_EVENT_RAISE.
    The program is delivered by Support Package for Basis Releases 640 and 700, and is included in the standard system in all subsequent releases.
    The program is used to trigger a batch event. Existing programs do not therefore have to be changed. The BTC_EVENT_RAISE program has several parameters in the selection screen, including the event (and parameters) that is to be triggered.
    PROCESS:
     Go To SM64
     Click on Create
     Create two events.
    Our Case:
    We created Z_ES_CP_AUTH and Z_SEC_AUTHS
     Go to SE38
     Give the event name as BTC_EVENT_RAISE
     Select Variants and click on Display
     Give the variant name as the one you created.
    Our Case:
    Z_ES_CP_AUTH
     Click on Create
     Give in the details for variants
     Click on attributes and give the details for attributes
     Go to the job which needs to be run first
    • Select the job in released status
    • Job->Change
    • Step
    • Add BTC_EVENT_RAISE as the last step of the job with the parameter as the variant created
    Our Case:
    Step: BTC_EVENT_RAISE, Parameter: Z_ES_CP_AUTH
     Go to the job which needs to be run next
    • Select the job in released status
    • Job->Change
    • Start Condition -> After Event.
    • Give the BTC_EVENT_RAISE parameter of the first job as the event of the second job.
    Our Case:
    After Event: Z_ES_CP_AUTH
     Save the changes.
     The jobs will start running one after the other with the given frequency.
    Thanks
    Joginadham U

  • Run Command Line in Task Sequence as current user

    Hi guys,
    So i have package that is running fine by itself as administrator. It creates folder in %USERPROFILE% if it doesn't exist. However when i put the package in task sequence it doesn't run properly since the TS is executed as System account. 
    Can you advise how i can run the package as the current logged on user with elevated rights in Task Sequence :)

    Well when i run package as standalone with %userprofile% variable in the command it runs as the current user. If i use it in task sequence i get the system profile instead. So instead of task sequence i am using one package with multiple programs to run
    one after the other.
    Does this make more sence?

  • BUG: Run command does not follow current project

    The Debug command respects which project is currently active, i.e. selected by the user in the project folder.
    The Run command, however, does not.
    Version 11.1.1.0.31.51.56
    Workaround:
    Choose a class file with a main method, then issue run.
    Regards,
    Erik

    Hi,
    is it as web project or a Swing project ?
    Frank

  • Pass password to runas command?

    Is there any way to do this? I need to kick off a executable on a Windows 2000 system but I need to do it as Administrator. I was going to use the runas command, but apparently there is no parameter for password. Instead, it prompts for it. Is there any way to fill in a prompt after you run it?
    I'm guessing the answer is no since once you start the program with a run process it's off doing it's own thing, but figured I'd ask.
    Anyone have any other suggestions?
    Thanks,
    James

    I don't know or have su.exe, so I can't say for sure. But generally speaking it is possible to start cmd.exe, then send commands to it, including "set". Like the following:    public static void main(String[] args) throws Exception {
            String c = "cmd.exe";
            System.out.println(c);
            Process p = Runtime.getRuntime().exec(c);
            PrintWriter writer = new PrintWriter(p.getOutputStream());
            BufferedReader in = new BufferedReader(
                new InputStreamReader(p.getInputStream()));
            Thread.currentThread().sleep(1000);
            writer.println("set foo=bar");
            writer.println("set");
            writer.flush();
            Thread.currentThread().sleep(1000);
            while (in.ready()) {
                System.out.println("From process: " + in.readLine());
            System.out.println("Process \'" + c + "\' finished");
        }This starts a new instance of command exe, sets the environment variable foo to be "bar" (only in the shell you just started, you don't have to explicitly null it out afterwards), and then lists the environment variables in that shell. However, it's not really bulletproof - I had to toy around with thread.sleep() to get the above to work as intended.
    Another (and probably easier) way might be to have your java program write a small bat file with the required commands, execute it, and delete it again.

  • Error while running commands at RMAN prompt

    Hi ,
    We have a few oracle 10g(10.2.0.3) databases on AIX platform.We use RMAN backup with a recovery catalog database.
    The rman full(level 0)backups are scheduled dailly and running fine.When I tried to run commands like 'list backup','report obsolete' I'm getting the following errors.
    connected to target database: TICSPROD (DBID=2626621498)
    connected to recovery catalog database
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 08/04/2011 07:49:36
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    RMAN> list backup;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 08/04/2011 07:56:25
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    But the recovery catalog database is up and running fine.For few other databases I'm able to run the above commands without errors and for some databases I'm getting the errors as mentioned above.
    Could someone help me out with this...

    Thanks Tycho for your reply.
    Please find the output of the query in recovery catalog.
    SQL> select * from v$resource_limit;
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
    processes 49 83 5000 5000
    sessions 30 63 5505 5505
    enqueue_locks 27 94 65910 65910
    enqueue_resources 27 73 24440 UNLIMITED
    ges_procs 0 0 0 0
    ges_ress 0 0 0 UNLIMITED
    ges_locks 0 0 0 UNLIMITED
    ges_cache_ress 0 0 0 UNLIMITED
    ges_reg_msgs 0 0 0 UNLIMITED
    ges_big_msgs 0 0 0 UNLIMITED
    ges_rsv_msgs 0 0 0 0
    gcs_resources 0 0 0 0
    gcs_shadows 0 0 0 0
    dml_locks 0 76 24220 UNLIMITED
    temporary_table_locks 0 3 UNLIMITED UNLIMITED
    transactions 1 10 6055 UNLIMITED
    branches 0 0 6055 UNLIMITED
    cmtcallbk 0 1 6055 UNLIMITED
    sort_segment_locks 0 5 UNLIMITED UNLIMITED
    max_rollback_segments 11 11 6055 65535
    max_shared_servers 20 20 800 800
    parallel_max_servers 0 32 320 3600
    22 rows selected.
    The alert log of the catalog database is continously getting refreshed with the following message.
    Incremental checkpoint up to RBA [0x3b3.a780.0], current log tail at RBA [0x3b3.a78f.0]
    Mon Aug 8 00:16:17 2011
    Incremental checkpoint up to RBA [0x3b3.abf8.0], current log tail at RBA [0x3b3.ac4f.0]
    Mon Aug 8 00:46:19 2011
    Incremental checkpoint up to RBA [0x3b3.1451b.0], current log tail at RBA [0x3b3.1451b.0]
    Mon Aug 8 01:16:21 2011
    Incremental checkpoint up to RBA [0x3b3.14b15.0], current log tail at RBA [0x3b3.14baa.0]
    Mon Aug 8 01:46:23 2011
    Incremental checkpoint up to RBA [0x3b3.14be1.0], current log tail at RBA [0x3b3.14bf0.0]
    Mon Aug 8 02:16:25 2011
    Incremental checkpoint up to RBA [0x3b3.15069.0], current log tail at RBA [0x3b3.150a9.0]
    Mon Aug 8 02:46:27 2011
    Incremental checkpoint up to RBA [0x3b3.150ed.0], current log tail at RBA [0x3b3.150ed.0]
    What could be the potential cause of the issue I'm facing .Could you please guide me...

  • Using computer variables in task sequence "Run Command Line"

    I am attempting to deploy VMs through VMware's vRealize Automation tool using CM. The process creates a CM computer object then creates a direct rule on a CM collection for the new computer object. During the creation of the computer object vRA creates computer
    variables provided by me on the computer object. I see the computer object built and i see the custom variables on the computer object:
    Name Value
    dns1 10.10.10.10
    dns2 10.10.10.11
    gateway 10.10.10.1
    ipAddress 10.10.10.2
    netMask 255.255.255.0
    In the task sequence the last step is to "Run Command Line":
    cmd /c netsh int ip set address name="Ethernet0" static %ipAddress% %netMask% %gateway% & cmd /c netsh int ip set dns name="Ethernet0" static %dns1% & cmd /c netsh int ip set dns name="Ethernet0" static %dns2% index=2
    When the TS gets to that step it doesn't substitute the variables in the command with the computer variables listed above. Looking at the smsts logs after the deployment is complete I see lines stating:
    Set Command Line:...
    Start executing command line:...
    Executing command line:...
    ProgramName = ...
    All of those lines show the command exactly as it is above with the %variables% intact.
    The command immediately fails with the error:
    Invalid address parameter (%ipAddress%). It should be a valid IPv4 address.
    Does anyone have a suggestion on why the TS isn't using the variables? I found this article https://technet.microsoft.com/en-us/library/bb693541.aspx but its for 2007 not 2012. I wasn't able to find something comparable for 2012.

    I don't know why anyone here thinks you *need* sccm osd to achieve fully automated customizations.
    Customer selects base image (2008 r2 core, 2008r2 gui, 2012 r2 core, 2012 r2 gui), which should be thin and with zero customizations anyway,
    vaai accelerated clone creates vm,
    ip addr/gateway/dns config is injected with powercli,
    customers config management engine agent of choice is installed via powercli script injection/execution (we have puppet users, ConfigMgr users, saltstack users, IEM users, Cheff users),
    the clone completes in ~2 minutes and a VM is presented to the customer in less than 5 minutes 
    Deploying windows VMs via SCCM OSD is not only slow, but requires dev work on the customer side to get things rolling which wastes everyone's cycles including your own

  • BO Edge 4.0 Installer stuck on "Run command-line executable"

    Hi,
    Our BO Edge BI Server 4.0 Installer on Windows Server 2008R2 is stuck on one of the last steps; "Run command-line executable".
    Before is was stuck on "WaitForCMSForTheFirstTime". We upped the RAM to 16GB and then the installer went past this, but after a full reset of the server and trying again it is now stuck a few steps later on "Run command-line executable". This is very frustrating, especially since there is no error message at all, no install log and the installer is just stuck indefinitely and we had to cancel it.
    At that point the Central Configuration Manager shows this:
    Apache Tomcat - Running
    BW Publisher Service - Stopped
    SAP BO Mobile Authentication Server - Stopped
    SAP BO Mobile Processing Server - Stopped
    Server Intelligence Agent - Running
    We can't deinstall from Windows to start over at this point because the installer says an install is in progress.
    What is going on?
    Help urgently needed and appreciated
    Edited by: J. Knulst on Jan 11, 2012 7:48 AM
    Edited by: J. Knulst on Jan 11, 2012 7:50 AM

    Hello,
    Yes, certain stages run for a long duration. "Run command-line executbale" runs for atleast 45 mins. It's normal.
    My suggestion would be to leave it for 45 mins-90 mins.
    Now that you have interrupted your installtion, try uninstalling it through the control panel.
    In case you can't see the software there, then you have to edit registry entries, which is very tiresome.
    Regards,
    Sonia

  • Oracle EM Grid Control Error: Failed to run command in process

    I am trying to change "Backup Settings". After entering the Host Credentials, when I click the OK button, I receive the following error message.
    Validation Error
    Examine and correct the following errors, then retry the operation:
    Error - Connection to host as user <user> failed.ERROR: Failed to run command in process
    Any Suggestions? Thanks in advance!

    Hi,
    If you are using linux/windows the hostname credentials should be the user who has installed the oracle 10g database software, if Windosw the user you are using need to be member of the ora_dba group and have Local Security privilege 'Log on as a batch job'.
    What you need to do is go to start----> Programs----> admin tools----> Local security policy --->local policies ---> user rights assignments
    In the list to your right, look for 'Log on as a batch job', double click and add the same OS local user you using to access OEM web to the group.
    I hope this will solve your problem.
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • Chromium OS - cros_sdk:make_chroot / chroot fails to run command ...

    Hi,
    Anyone encountered this error recently when working with cros_sdk and make_chroot?  I previously had no problem building ChromeOS with Archlinux earlier this year.  But now it appears there are some fundamental issues with the chroot set-up that are incompatible.  I realize that only Ubuntu is supported, however any tips on isolating this issue so that I can get it working myself would be much appreciated.  Details below.
    [seanvk@arch chromiumos]$ ./chromite/bin/cros_sdk
    Attempting download: https://commondatastorage.googleapis.co … 004.tar.xz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  349M  100  349M    0     0  2245k      0  0:02:39  0:02:39 --:--:-- 2185k
    Cleaning up old tarball: cros-sdk-2013.07.20.203602.tar.xz
    INFO    cros_sdk:make_chroot: Unpacking STAGE3...
    INFO    cros_sdk:make_chroot: Set timezone...
    INFO    cros_sdk:make_chroot: Adding user/group...
    chroot: failed to run command ‘groupadd’: No such file or directory
    Running ['/data/chromiumos/src/scripts/sdk_lib/make_chroot.sh', '--stage3_path', '/data/chromiumos/.cache/sdks/cros-sdk-2013.07.21.084004.tar.xz', '--chroot', '/data/chromiumos/chroot', '--cache_dir', '/data/chromiumos/.cache'] failed!
    [seanvk@arch chromiumos]$
    [seanvk@arch chromiumos]$ uname -m
    x86_64
    [seanvk@arch chromiumos]$ uname -a
    Linux arch 3.9.9-1-ARCH #1 SMP PREEMPT Wed Jul 3 22:45:16 CEST 2013 x86_64 GNU/Linux
    Thanks,
    Sean

    WELL.  A quick 'df' shows that I am using 100% of my filesystem.  How embarrassing.

  • Gnome run command source .bashrc

    Hi, after using just xmonad for a long time I'm now trying to get gnome and xmonad to play nicely together.  I am starting my gnome-xmonad session from GDM which was started with runlevel 5 in inittab--I followed the wiki.  Now in gnome, the run command dialogue (alt-f2) does not seem to source my ~/.bashrc.  I use an xmonad run util and under gnome-xmonad that run util does not source my ~/.bashrc either.  I have my PATH specified in my .bashrc but I cannot run the commands that rely on the path set in .bashrc.  I do have a ~/.bash_profile which sources ~/.bashrc, so that is not the issue.  In a terminal, my path is fine, but not from those run dialogues.  The xmonad run util worked fine when I would start xmonad with startx.  Any advice on how to get gnome to source my ~/.bashrc?

    I don't know about sourcing your .bashrc in gnome, but you are probably better off moving your PATH definition to your .bash_profile, before you source the .bashrc.

  • Mac mini shutting down with screen(s) running commands/code?

    My mac mini started shutting down while in use. It then runs commands or code very quickly over screen after screen. Have to restart. Keeps happening. Can you help?

    Hi and welcome.
    Could you give us a bit more history about your Mini and what lead or leads up to this?
    Do you have a G4 Mini (2 usb ports), CoreDuo/Core2Duo Intel Mini (4 usb ports), or a 2009 Intel Mini (5 usb ports)?
    What version of OSX are you running? (Apple Menu > About this Mac)

  • NAC Custom Check to run command

    hi,
    i have a case where i want to check whether the computer has join the microsoft domain or not.
    after searching, i found the effective way is to run command nltest.exe. nltest.exe is a command to check trust relationship between workstation and domain controller.
    is there any way that custom check can do this ? in CAM document, only registry, file, service, and application check.
    this is the link from Microsoft : http://support.microsoft.com/kb/158148
    example:
    C:\>nltest /server:test3 /sc_query:testd
    Flags: 0
    Connection Status = 0 0x0 NERR_Success
    Trusted DC Name \\TEST2
    Trusted DC Connection Status Status = 0 0x0 NERR_Success
    The command completed successfully
    Can Clean access agent do the command line check and interpret the result ?
    thanks,
    yd

    The Cisco NAC Agent will not able to run and interpret the command output.
    If the goal is to check whether the computer is a member of a known domain, you can check 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Domain' to contain the name of the domain.
    -Dan

  • Cycle Marker Toggling-trigger another to switch to after current finishes?

    Hello!
    I am programming the pads of an akai lpd8 so that each one will represent jumping to a different marker in a project. I want easy access to different song sections as a song-writing tool.
    Is there a way that I can trigger marker after marker, and have the newly selected marker playback only after finishing the current cycle section of the marker I previously selected? This would make the Logic environment sort of a performance tool, allowing me to preemptively select the next desired marker section, instead of having to have my timing down to jump the next section.
    Is there a way to select this type of cycle/marker playback?
    Thanks!

    Scroto Saggins wrote:
    Hey Erik, thanks for the reply. I hadn't realized that I had gotten one.
    But yeah, that is exactly what I did. I set up a drum pad to essentially represent the different markers I can jump to.
    With Cycle activated, any time I trigger a different marker, it will just loop that marker area, which is awesome.
    I didn't realize it worked that way. But sounds like a brilliant feature, also in other (composing, editing, mixing etc) workflows. Gonna try it out myself now!
    What I really want, is to be able to slap another trigger, while another is currently playing, but not have the playhead jump to the new marker until the one currently playing finishes the 'lap' it is running.
    See what I'm saying now?
    Yes, like a home keyboard would handle things, basically. Or hardware sequencers. You merely 'ready' for the switch. It should be possible, yes. I'll look into it, I remember there is a feature called 'touch tracks', that could be the way to go here.
    On second thought.... this is not something I've ever done myself, in Logic (I don't use it as a performance tool), and it may be more complicated than it appears...
    This seems like it could be a reasonable request in theory, and I know Logic is pretty resourceful if you don't mind getting your hands dirty
    Mmm.... yeah... I see... Dirty hands eh...?
    to get it to behave how you want it to.
    Yes, that's true, though this looks pretty tough, actually. But I'll go see if the environment may have something to offer. Or meta events perhaps. Or indeed touch tracks (although I think they also react immediately, in stead of finishing the running section.)
    Do you know what I mean now? Any thoughts or suggestions?
    Thought: environment, touch tracks, meta events? I'm going to look at that.
    Another suggestion would be to also post this question on:
    http://www.logicprohelp.com/index.php
    OK, I'm gonna get manually dirty diggin' digitally now...
    Later!

  • SSH SUDO passwordless to run commands on remote server

    Hi Experts,
    We are running various OS/Network and Database related commands and scripts on Local and Remote Server to perform/compare the results
    As part of this activity, we have bottleneck on running commands/scripts on the remote server as we need to provide password everytime whenever we use SSH command
    Also, we need to run command as ssh sudo su - oracle for security purpose which prompts password two times.
    we would like to automate this process in order to save password securely(temporarily) while running ssh sudo commands/scripts.
    I see, there are various solutions using SSHPASS,EXPECT commands, however we dont have anything available to use within our group.
    We may not be able to use SSHPASS as this component not installed during VM build, so we left with only option to use EXPECT.
    So, Need your help to get any example working script using EXPECT for ssh sudo passwordless connection.
    Appreciate if anybody can share ideas or working scripts
    Thanks in advance

    FWIW, here is a small script that I wrote several years ago that may help you to automate the password less ssh setup with a remote system. I just verified it and changed it to create a RSA key. The script still works and runs fine under Oracle Linux and Mac OS X.
    Simply create a script called "passwordless-ssh" with the content shown below.
    Assign execute privileges: chmod u+x passwordless-ssh
    Then run the script as following:
    ./passwordless-ssh user@target_hostname_or_ip
    The script will create a ssh RSA private and public key, prompt for the remote host password and the copy the pubic key to the remote host. A subsequent ssh login to the remote host should no longer prompt for the password. It is essential however that the scrips runs in an interactive session, which is verified.
    #!/bin/bash
    # Creating SSH public RSA key if non exist and copying it to remote target
    # for passwordless SSH login.
    # Author: Catch 22, Oracle OTN, 28-APR-2015
    # Arguments: $1 (ssh login to remote target)
    ME=passwordless-ssh
    LOGFILE="/tmp/$ME.log"
    f-mode()
    # Check if session is interactive (terminal) or non-interactive (UDEV).
    # Output: 0 = interactive, 1 = non-interactive
       [[ -t 0 || -p /dev/stdin ]] && return 0 || return 1
    f-log()
    # Display messages in interactive mode, or write output to syslog
    # (/var/log/messages) when in non-interactive mode. Write the messages
    # to a logfile if the syslog logger interface command is not available.
    # Input: $1 = text
       if f-mode; then
          echo "$ME: $1"
       elif hash logger; then
          logger "$ME: $1"
       else
          echo "$ME:`date`: [logger] Cannot execute, aborting" >> $LOGFILE
          echo "$ME:`date`: $1" >> $LOGFILE
       fi     
    # Exit and show error if current session is not interactive.
    [ ! f-mode ] && f-log "[session] non-interactive, aborting" && exit 1
    keyfile="$HOME/.ssh/id_rsa"
    [ -z "$1" ] && echo "Missing 'user@target_host' argument. Aborted." && exit 1
    if [ ! -f $keyfile ]; then
       mkdir -p $HOME/.ssh
       ssh-keygen -t rsa -f $keyfile -N ''
    fi
    keycode=`cat $keyfile.pub`
    remote_cmd2="echo "$keycode" >> $remote_ssh_file; chmod 644 $remote_ssh_file;"
    remote_ssh_dir="~/.ssh"
    remote_ssh_file="$remote_ssh_dir/authorized_keys"
    ssh -q $1 "mkdir -p $remote_ssh_dir; chmod 700 $remote_ssh_dir
    echo "$keycode" >> $remote_ssh_file; chmod 644 $remote_ssh_file"
    unset ME LOGFILE keyfile keycode remote_ssh_dir remote_ssh_file
    #END

Maybe you are looking for

  • X1 Carbon (20AX series) wifi connectivity issues

    Dear Lenovo Support and all others, I am posting this in hope that someone can help with my problem and also to share my unpleasant experience with a new Lenovo product. Lenovo Thinkpad X1 Carbon Model: 20A8A00VSG OS: Windows 7 Pro 64bit Purchase dat

  • Excel fails with unexpected error unless vba editor opened before running

    i have an excel macro which fails with an unexpected error unless i open vba editor first EXACT MESSAGE IS "MICROSOFT EXCEL HAS ENCOUNTERED A PROBLEM AND NEEDS TO CLOSE, WE ARE SORRY FOR THE INCONVENIENCE" I HAVE SENT AN ERROR REPORT many times, no r

  • File/Hadoop CSV input : Discovery of file fails

    Hello , I'm trying to make the project as described in - "Hands-on Tutorial: Building a Simple SAP Sybase ESP Project" for SAP Sybase ESP version 5.1 SP04. I create a project where I add an input adapter of type - File/Hadoop CSV input. Then in edit

  • Share a contact via bluetooth

    hello everyone, stupid question here, i am sure it has already been ask 1000 times but i just cant find it can you share a contact with another iphone/ipod touch VIA bluetooth withou bump or any such app? when i click share contact it opens up emails

  • I wanted to syc my iPhone to my newly bought macbook. How do I do that?

    I got my new macbook recently. Now I wanted to syc my phone to the i tunes on my new macbook. When I try to do that, it warns me of losing all data. Is there any way I could sync my phone to the new macbook.