Find the answer to your Linux question:
Results 1 to 3 of 3
# Scripts to print user information who currently login, current date & time # clear echo "Hello $USER" echo "Today is \c ";date echo "Number of user login : \c" ...
  1. #1
    Just Joined! EchoOnFedora's Avatar
    Join Date
    Sep 2010
    Location
    US
    Posts
    24

    script command issuse

    # Scripts to print user information who currently login, current date & time
    #
    clear
    echo "Hello $USER"
    echo "Today is \c ";date
    echo "Number of user login : \c" ; who | wc -l
    echo "Calendar"
    cal
    exit 0

    whats wrong with this script? this is what i get without the calender

    Today is \c
    Sun Sep 26 17:44:05 EDT 2010
    Number of user login : \c

  2. #2
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    From the echo manpage:

    -e enable interpretation of backslash escapes
    So commands should look like:

    Code:
    echo -e "Today is \c ";date

  3. #3
    Just Joined! EchoOnFedora's Avatar
    Join Date
    Sep 2010
    Location
    US
    Posts
    24
    awesome. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...