Execute commands inside new shell with a single line?

I need some way to run series of commands as a single line, however the problem is that I am changing to another shell at one point and I am not sure how I can make commands execute in that new shell.
Here is what I am trying to do (as I am running it now)
adb shell
ubuntu_chroot shell
nohup /home/phablet/test/test2.sh
I am able at the moment to call this:
adb shell "ubuntu_chroot shell"
But I am not sure how I can execute line that calls test2.sh after that on a single line.
Last edited by kdar (2013-03-01 05:54:33)

Does ubuntu_chroot have a --help flag or manpage?
It's fairly common for shells to have a -c flag which will make them run the first argument in the new shell.
Edit: Just looked through the Ubuntu Touch repos, ubuntu_chroot is (currently) only able to launch a shell, but it should be easy to modify it to just pass on the additional arguments to sh
uchroot repo here if anyone's interested.
Last edited by demize (2013-03-01 04:10:27)

Similar Messages

  • Executing command in new powershell window

    Hello guys, I'd like explore directions with gci, but the thing is that istead of using -recurse I'd like to open every single direction in new powershell window. I've made something like this:
    function Get-ScriptDirectory
        $Invocation = (Get-Variable MyInvocation -Scope 1).Value
        Split-Path $Invocation.MyCommand.Path
    $path = Get-ScriptDirectory
    $paths = Get-ChildItem $path -Recurse | ?{ $_.PSIsContainer }
    foreach ($element in $paths) 
        start-process powershell
        $new= $path, $element -join "\"  
        gci $new
    But I don't know to make Powershelle execute command in new window. Start-process powershell only opens new window, but it doesn't import bolded commands. Can I get any suggestions?

    Hi Shadston,
    To add cmdlet in "-command", please refer to the script below:
    Get-ChildItem (Split-Path $MyInvocation.MyCommand.Path) -Recurse -Directory |ForEach-Object{
    start-process -FilePath powershell -ArgumentList @('-NoExit',"& {GCI '$($_.FullName)'; Write-Host 'Hello' }")
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to fix AppleEvent handler failed error with command "make new mailbox with properties"

    Below is the script I am running to create a hiearchy of new mailboxes inside "ON MY MAC" folder area.
    tell application "Mail"
      make new mailbox with properties {name:"ABar"}
      make new mailbox with properties {name:"ABar/Foo"}
      make new mailbox with properties {name:"ABar/Foo/Me"}
    end tell
    When I execute this the first mailbox is excuted fine but right afterwards I get the following error:
    error "Mail got an error: AppleEvent handler failed." number -10000
    I have tried adding delays but this does not work either. Code:
    tell application "Mail"
      make new mailbox with properties {name:"ABar"}
      delay 0.2
      make new mailbox with properties {name:"ABar/Foo"}
              delay 0.2
      make new mailbox with properties {name:"ABar/Foo/Me"}
    end tell
    However rerunning the script and skipping over the make command if the folder already exit, causes the next exuction time to create one more folder.
    Code:
    tell application "Mail"
              if (mailbox "ABar" exists) = false then
      make new mailbox with properties {name:"ABar"}
                        delay 0.2
              end if
              if (mailbox "ABar/Foo" exists) = false then
      make new mailbox with properties {name:"ABar/Foo"}
                        delay 0.2
              end if
              if (mailbox "ABar/Foo/Me" exists) = false then
      make new mailbox with properties {name:"ABar/Foo/Me"}
                        delay 0.2
              end if
    end tell
    ** Anyone know how to solve this or why this is happening? **
    It almost feels as if the hiearcgy is read into memory and this is not updated after the creation of the new mailbox.
    Thanks!

    Hi,
    The processors are different archiectures and you can not use binaries from one architecture to work on the other.
    Library name suffix differences is an example of the importance of this. Tuxedo 6.5 was separately built for each of those architectures and
    is available on the PeopleSoft distribution as distinct binaries. If your migration was purely from HPUX11.11 to HPUX11.23 you might have
    succeeded but the processor difference will not work for you and a core dump would not be unexpected.
    Bob Finan
    FYI:
    Tuxedo 6.5 is end-of-lifed and, since it's EOL has passed the stage for extended support possibility, no new patches will
    be created for it by engineering. You should look to migrate to a newer version of Tuxedo/Peoplesoft at the earliest
    possiblity.

  • Problem in using JDBC Execute commands(Update & Delete Only) with af:Table

    HI Everyone,
    I have one issue with Updating and Deleting Row Data using JDBC Execute commands.
    Suppose In My Application i have two pages, in Page 1 I have Two Command Buttons(Delete and Save) and One Input TextBox to write the String to be stored in the Database. and Page 2 where the result Table is shown and table is binded with a ViewObject, Now When User Types some String in InTB and click Save then By Programmatically I'm searching, that string is already present in database or not, if it is already exist then Save button converts in Update button and instead of inserting it allows user to Update the String already exist in database.
    Everything is working fine but the problem comes when i put those all buttons on the same page where result table is present.After putting all things on the same page and When i click save button to insert new String it is Successfully inserting but when any of other action is performed like updating or Deleting the existing one.. then my application just hanged and then nothing I able to do.
    Please Help me to understand this problem and give me the solution for this..
    Thanks
    Fizzz...

    Hi frank,
    Thanks to reply me...
    I'm refreshing table's iterator on each command button's action to reflect the changed result... and i'm sorry i mentioned two pages in my project.. actually these are two forms in the same page..which conditionally changed its renderer properties.. its working fine when only one form is renderred and the otherside when both are rendered then it is not working.
    Hope this change will help you to understand the problem.. if something else you are looking for then please tell me..
    Thanks
    Fizzz...

  • BAPI_BILLINGDOC_CREATEMULTIPLE, creating a Bill doc with a single line item

    Hi there,
    I am trying to create a Billing document with reference to Sales document using this BAPI (BAPI_BILLINGDOC_CREATEMULTIPLE)
    ..but the generated billing document is creating only single line item where as the original Sales document is containing a Two line items, ie. 1 main line item an a Sub line item for this .
    I am passing the Values mentioned below..
    As per requirement is need to create a Pre invoice or a Proforma with Provided Sales Document.
    it_billingdata_in-ORDBILLTYP =  Proforma/Preinvoice
    it_billingdata_in-REF_DOC =  Reference Sales doc number
    it_billingdata_in-REF_DOC_CA = Reference Sales document category('C').
    Can some one please suggest any thing else do i need to pass apart of these field..
    Appreciate of some one answer me.
    thanks
    Srinivas

    Hi Srinivas,
    You need to loop on the internal table 'it_billingdata_in' based on the Sales Order line items and pass the value to 'it_billingdata_in-REF_ITEM' for every line item of the Sales Order.
    Hope this helps.
    Regards,
    Pranav.

  • How can I execute command passwd in solaris with Java (ProcessBuilder)

    Hi all, my problem is that I want to change the user password in solaris 10, but from a Java programm, I was trying with ProcessBuilder but I don't know how insert the new password, Who can help me?

    I'm not sure, but I think passwd is one of those programs that only lets itself be run interactively from a terminal.

  • New GIMP with optional single-window mode

    According to this blog http://www.mmiworks.net/eng/publication … -mode.html, GIMP will have a single-window option in the future. This has regularily been a request by the community, especially by people using GIMP under Windows. As preferences of the community are at 50%-50% for or against a single window user interface, they want to keep both as an option.
    I installed gimp-git from AUR today but I did not see an option to activate the single window mode. Anybodfy else tried this?

    There is a discussion about it on gimp-dev. This thread may have forked in the middle, but the idea keeps going:
    https://lists.xcf.berkeley.edu/lists/gi … 23253.html
    For those of you that have never been to their mailing list, Firefox will complain about a bad certificate. It's been this way for years and isn't a malware site.

  • Need help with a single line..

    ((Vector)accountChars.get((String)charAccounts.get((String)charNames.get(i)))).add((String)charNames.get(i));
    In this line...
    AccountChars is a Hashtable. It contains Vectors(as values) and Strings(as keys)
    charAccounts is a Hashtable. It contains Strings(as values) and Strings(as keys)
    charNames is a Vector. It contains Strings(as values)
    I'm trying to add a String into a Vector that is inside a Hashtable, but I get NullPointerExceptions when trying to execute it... Can anyone help?

    well breaking it up that way is enough, because the
    error is being generated on this line:
    entry.add((String)charNames.get(i));The two things in that line that can throw that exception are: charNames being null, or entry being null. Considering neither of these are instanciated in this line, then the problem isn't actually with this line. The problem is that one of those objects has a null pointer reference. You'll have to go through your code and make sure all of them are instanciated or set to a reference that ins't null. Using the "new" keyword is one way to do this.

  • Multiple PO's created for a SC with a Single line item except delvery date

    Hi Experts,
    I have one issue ... SRM - Classic scenario
    One Shopping Cart created with one line item ... but generated two PO's EX - First one  - A and Sec - B
    Almost the  data is ame except the delivery date .
    There can be a possibility that it was splitted into two PO's .. I will accept it ... but the problem I am facing is different ...
    When I am trying get the PO details in SRM side .. using Tcode BBP_PD ... I am able to see two PO's ...
    But when I am trying get the PO details using the FM - BBP_PD_PO_GETDETAIL .. here I am able to see only one PO that is B here ...
    I am not able to find PO - A in SRM Side ...
    But I can See in the backend sys .. R/3 ... TWO PO's (A and B) are available ......
    IN backend system we are having one Report Program Which will display the Shopping cart number for the perticular PO number ... when I am trying to execute this report to get the Shopping cart number for A Purchage Order ... I am not able to get the Shopping cart number ... message is Shopping cart does not exist ... in this program we have used the standard FM only ... there is no problem with this report ...
    My Question is Why I am not able to see the first PO ( A ) at SRM end  ... there is table where the PO's get stored at SRM end  BBP_PDBEI .. in this table also I can see only the PO - B not A .
    1.Please let me know what can be the problem ... and guide me to find the PO at SRM end ...
    2. Why the Shopping cart converted into Multiple PO .. when thr is only one line item ...
    3. I think PO cannot be split into multiple PO's based on Delivery date ...
    We have not done any splitting criteria in our system ... everything is standard only ...

    hi Hari
    only one PO is possible . check the item both are same or not.
    for eg. one sc created and went to cockpit for vendor assignment - PO will created from purchase rside
    in the mean time end user change the material in the cart via check status and assign valid source of supply and PO will create.
    1 sc- 2 POs created in my past experience.
    and deleted which PO i dont like.
    in BBP_PD you can not see PO docs, since you are in classic ? you can see if it is order as direct material since PO will create in SRM  though it isa classic..
    what really happened in your system,
    po split for delivery date means how did you get different dates.
    br
    muthu
    Edited by: Muthuraman Govindasamy on Oct 27, 2009 12:10 PM

  • Create new page with every excel line

    Hi Everyone,
    I have a InDesign document linked up with a excel document. My question is: How do I make indesign create a new page every time a new excel line is added? I want to create an individuel page for every line.

    Or, you could create a paragraph style that has a Keep Option that specifies the paragraph start on next page and you can place the .csv or .txt file normally, using that paragraph style.

  • Launching commands in a shell via the Fluxbox menu?

    Is there a way I can configure ~/.fluxbox/menu so I can launch command-line progs in a shell?  For example, running jackd - I want to see the output in a shell as it runs.

    With xterm, if you don't want the terminal to close when the application finishes, add the -hold flag.
    But I cannot figure out how to get the following behavior via a single command:
    1. open new terminal with a shell
    2. execute a command under that shell
    with the shell staying open for further commands.
    That must be possible. Can I get a handle on the new shell and then pipe input to it? I don't really care if the shell is a login shell or inherits my current environment.

  • How to format generated XML using XMLELEMENT() my output is coming in a single line i want it to be in a XML format

    hi I am having problem in formatting XML file which I generated with xmlelement() when I execute it gives me putput in a single line
    is there any way that I got my output as a XML file HAS......

    That is expected behavior. PRETTY print(ing) is only needed for humans. XML Parsers don't need the XML to be pretty printed. If you open the XML file in a browser like Windows Explorer or Firefox, the browser will pretty print the output for you.
    In all, the "single line" output is done because of PERFORMANCE reasons (lack of unneeded end of line and CTRL line breaks etc)
    SELECT xmlelement("Employee Name", dummy) as "XML RESULT"
    FROM DUAL;
    <Employee Name>X</Employee Name>
    SELECT xmlelement("Employee Name", xmlelement("SurName", dummy)
                                     , xmlelement("LastName", dummy)
                     ) as "XML RESULT"
    FROM DUAL;
    <Employee Name><SurName>X</SurName><LastName>X</LastName></Employee Name>
    XMLSERIALIZE can pretty print the output if needed via INDENTation
    SELECT XMLSERIALIZE(CONTENT xmlelement("Employee Name", xmlelement("SurName", dummy), xmlelement("LastName", dummy)) as CLOB indent SIZE=1 )
    FROM DUAL;
    <Employee Name>
         <SurName>X</SurName>
         <LastName>X</LastName>
    </Employee Name>

  • Single Line $45. plan--gone as of March 13th

    Looks like it was too good to be true. A smartphone line that had unlimited talk&text plus 250mb of data for very light users. Its been taken off the website,
    as of 3/13. Now, you can only get the $60 1gb single line or new $75. 2gb single line. Both have unlimited talk&text. Low use customers have just lost that
    option, unless the company brings it back. I hope they do. I missed it by one day.

    Typical of Verizon.  A Byzantine price structure so complicated that even Verizon reps don't understand it, then Verizon refuses to honor misstatements made by their reps.  I had three different issues trying to upgrade my lines and convert from a grandfathered family plan.  Each time I got a different story, each time the next rep refused (or was unable) to honor the offer/information provided by the previous rep.  Was told VZW would honor a sale on the Note 3 if I waited until a number port was complete, then they wouldn't (ironically I went to Best Buy and got the same deal, then Verizon reoffered the deal after I purchased from BB- too little too late), was told my employer discount would apply to the $45 250 MB plan, then after I selected that plan was told it wouldn't, was told I could switch between 250mb and 1 gb plan as needed when I traveled, well, the 250mb plan is already gone so that was wrong too. 
    I've been with Verizon for over 10 years as a customer and actually sold Verizon cell phones in my electronics store before that.  VZW is rapidly overtaking Xfinity for worst customer service in the tech industry for the same reason- pricing and policies so confusing and misleading they couldn't honor them if they wanted to.  And they obviously don't want to.

  • Single line Textfield & PHP

    Is it possible to have a single line TextField that retrieves
    text using PHP from a Mysql database? I've managed to do it with a
    Multi line Textarea but the same code doesn't seem to work with a
    Single line TextField.
    I've attached the code I tried for the Single line TextField.
    Many thanks
    Leao

    typically you would put your connection and sql info in your
    head and assign
    your dataset a variable name, then reference the variable
    name.
    I don't see why that would effect your data retrieval, but
    you didn't say
    what your error was, eiither.
    what's it telling you?
    "Leao16" <[email protected]> wrote in
    message
    news:ecgatk$a98$[email protected]..
    > Is it possible to have a single line TextField that
    retrieves text using
    > PHP
    > from a Mysql database? I've managed to do it with a
    Multi line Textarea
    > but the
    > same code doesn't seem to work with a Single line
    TextField.
    >
    > I've attached the code I tried for the Single line
    TextField.
    >
    > Many thanks
    >
    > Leao
    >
    > <form method="post" action="nnameamember1.php">
    > <div align="center">
    > <p>
    > <input name="nnameamember1" type="text"
    id="nnameamember1"
    >
    value="<?phpmysql_connect("mysql","username","password") or
    > die(mysql_error());mysql_select_db("database_text") or
    die(mysql_error());
    > $result = mysql_query("SELECT * FROM grid")or
    die(mysql_error()); $row =
    > mysql_fetch_array( $result );echo
    $row['nnameamember1'];?>" size="20">
    > </p>
    > <p>
    > <input type="submit" value="change nickname">
    > </p>
    > </div>
    > </form>
    >

  • How to invoke BASH shell and execute a command in that shell in Windows 98

    Hello, I have a problem and if somebody will help me, I will be very glad. Thank you.
    I am using BASH shell on Windows 98 OS by means of CYGWIN. And I want to invoke this BASH shell and execute a preprogrammed command in the shell (./scan fileName.txt) from a JAVA program. But so far, I am not sucessful. I can not read or write anything from / to BASH shell. It either blocks and freezes (When I use waitFor( ) ) or appears and disappears without executing scan command (When I do not use waitFor( ) ). My code is like this:
    // This method is used for compiling a file.
    // It invokes BASH shell and executes "./scan fileName.txt" command
    public void compileFileMethod () {
    try {
    Process proc = ( Runtime.getRuntime() ).exec ("C:\\MyDocuments\\CYGWIN.BAT); //I also tried to add -c ./scan fileName.txt after .BAT );
    // I also tried to write "C:\\MyDocuments\\BASH.EXE" but it did not help
    OutputStream ostr = proc.getOutputStream();
    BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter (ostr) );
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader ( new InputStreamReader (istr) );
    InputStream errorStr = proc.getErrorStream();
    BufferedReader errorBr = new BufferedReader ( new InputStreamReader (errorStr) );
    bw.write("scan case40.10.txt"); /* I am trying to input the scan command to the shell,but it is not working*/
    bw.flush();
    Vector list = new Vector (1) ;
    String str;
    while ( (str = br.readLine() ) != null) {
    list.addElement(str);
    } // End of while
    Enumeration enumForList = list.elements();
    while ( enumForList.hasMoreElements() ) {
    String tempString;
    tempString = ( String ) enumForList.nextElement();
    System.out.println(tempString); // I am trying to read the outputs of the scan command but it is not reading (I can not see any output)
    I tried with and without waitFor( ), it did not work
    // wait for command to terminate
    proc.waitFor();
    // close streams
    br.close();
    bw.close();
    errorBr.close();
    } // End of try
    catch ( IOException ioe ) {
    JOptionPane.showMessageDialog (null, "Input / output error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of catch
    catch ( SecurityException se ) {
    JOptionPane.showMessageDialog (null, "Security error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    catch ( InterruptedException ie ) {
    JOptionPane.showMessageDialog (null, "Interruption error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of method compileFileMethod
    // Thank you for your helps and time.

    You cannot invoke BAT files directly, you have to invoke the program that run those files which is your Windows 98 shell. For example (under windows 2000), i would invoke "cmd.exe sricpt.bat some args", rather than "script.bar some args".
    Hope this will help you out.

Maybe you are looking for

  • Questions on FND Diagnostics in 11.5.10 Base version

    Hi, We have 2 instances. One is 11.5.10 base version and the other is 11.5.10 CU3. Doing, Diagnostics > Show Log on Screen > Statement (1) , is fine in CU3. However, when I do that in 11.5.10 BASE I am not getting the debug messages like, oadbtransac

  • Can't import iPhoto Library - Aperture 1.5.2 & iPhoto 6.0.5

    I have tried searching the Aperture discussions for a solution, and have only found one useful topic from July 2006: http://docs.info.apple.com/article.html?artnum=303438 However, it states this was a partial solution with Aperture 1.0 & iPhoto 6.0.1

  • JWS 1.4.2_06 NoClassDefFoundError

    Help! I am trying to deploy a new application written in java version 1.4.2_01-b06. The network people pushed out JWS version 1.4.2_06 to almost 2000 workstations. The new app will not work with that JWS and returns the error message listed below (No

  • Credit and Debit

    Dear experts still now am confusing in the part of Debit and Credit please explain me briefly with example about the Credit and Debit expecting more reply. regards anand

  • HUM 1.2.0 - Unable to Purge Quick Reports

    Hello, When I goto HIM -> Admin -> Purge Details, it shows 'Next Data Purge job scheduled at: -'. Even though I have set the purge for Quick report to older than 3 days, yet the quick reports folder has files dating back month and a half. How can I e