Thread: Writing alais....

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    19

    Question Writing alais....

    Hi all,

    i want to open an file in new xterm window......

    for this i have to give command in command line as..

    xterm -e vim <file name> &

    The above mentioned command i have to run like this,
    xrun <file name>

    for this how should i write alias for "xrun"


    Thanks in advance....

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    If we ignore the problem of adding an ampersand (&) at the end:

    alias xrun "xterm -e vim"

    then do "xrun myfile &" and it will do what you wanted.

    When I searched "man bash alias", I found that there's no way to have arguments for the alias, so if you really want to add the ampersand, you'll have to write a shell-script (or use csh - if that's available in your Linux installation - bash is the default and most common shell).

    --
    Mats

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-20-2008, 08:57 AM
  2. Very slow file writing of 'fwrite' function in C
    By scho in forum C Programming
    Replies: 6
    Last Post: 08-03-2006, 02:16 PM
  3. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM
  4. help! fifo read problem
    By judoman in forum C Programming
    Replies: 1
    Last Post: 08-16-2004, 09:19 AM
  5. file writing and reading
    By Micko in forum C Programming
    Replies: 8
    Last Post: 01-13-2004, 11:18 AM