Results 1 to 4 of 4

Thread: Typing of more than one command.

  1. #1
    Join Date
    Nov 2009
    Posts
    13

    Typing of more than one command.

    I usually work in command prompt. I am not able to use another command when i am working in one command prompt.? It can prove beneficial if I can use another command prompt simultaneously. Its very tedious job to work on single command prompt. Give some suggestions for my query.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,295

    Re: Typing of more than one command.

    You can use more than one command by using pipe or the ampersand. It depends on which version of Windows you are using. The listed below are the examples for each version of Windows. The command initially get the root of current drive and later it run the Dir command to list the current contents of the root as usual.
    For the users of Microsoft Windows 95, Windows 98
    cd\ | dir
    Microsoft Windows 2000 and Windows XP users using the command shell
    Instead of using the pipe, it later changed to the ampersand (&). Therefore you would need to type the below command to have the same results as earlier versions of Windows.
    cd\ & dir

  3. #3
    Dr. V Guest

    Re: Typing of more than one command.

    If you are working in Linux, then also you can use two commands at a time.
    For this you would type: command1 && command2
    Here the command2 will only be executed if command1 is executed successfully. In theoretical term it is known as logical AND.
    If you want to execute command2 even the command1 fails then
    You would type:command1 || command2
    command2 will be executed if command1 does not successfully complete. This is called a logical OR.
    Executing commands sequentially
    type:command1; command2
    command2 will execute once command1 has completed.
    You can also use multiple commands by using ; (semicolon) between them.

  4. #4
    Join Date
    Jan 2008
    Posts
    3,388

    Re: Typing of more than one command.

    After going through your query, i came to know that there is a solution for your problem. Yes, you can definitely open some another command while operating others as well. The shell and version of Windows which you are using will decide which command is suitable for the computer. In these examples the command would first get to the root of existing drive and then it will run on the dir command to list the present stuffing of the root.

    cd\ | dir

    As there is an alternative of using the pipe Microsoft determined to alter it to the ampersand (&). As a result you would need to type the below command to have the same results as prior version of Windows.
    cd\ & dir

Similar Threads

  1. Replies: 2
    Last Post: 21-03-2012, 03:23 AM
  2. Replies: 3
    Last Post: 03-09-2009, 05:41 PM
  3. Linux history command and fc command
    By Alkesh jain in forum Operating Systems
    Replies: 3
    Last Post: 26-05-2009, 07:53 PM
  4. Command Line Ren (Rename) command broken?
    By SixSigmaGuy in forum Vista Help
    Replies: 2
    Last Post: 18-05-2008, 03:30 PM
  5. Replies: 1
    Last Post: 18-05-2007, 01:24 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,253,442.46771 seconds with 17 queries