Thread: unix shell

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    31

    Question unix shell

    How would i define a shell alias that reports only the current time using the date command?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Code:
    $ alias aa="date +%r"
    $ aa
    11:43:53 PM
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    alias's are defined in the .cshrc file, be careful i changed my cshrc file once with a cls alias and everything went horriby wrong
    Monday - what a way to spend a seventh of your life

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by iain
    alias's are defined in the .cshrc file, be careful i changed my cshrc file once with a cls alias and everything went horriby wrong
    Just add them to your .profile file....
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to program in unix
    By Cpro in forum Linux Programming
    Replies: 21
    Last Post: 02-12-2008, 10:54 AM
  2. UNIX shell programming
    By Tozilla in forum Linux Programming
    Replies: 0
    Last Post: 08-31-2003, 09:22 PM
  3. programming unix shell piping problem
    By Kyro in forum Linux Programming
    Replies: 2
    Last Post: 08-28-2003, 07:52 AM
  4. Running 'exec' twice in one UNIX shell script
    By Zughiaq in forum Tech Board
    Replies: 2
    Last Post: 05-03-2003, 12:04 AM