Tuesday, November 18, 2014

Scheduler to reboot Windows PC

    1. Press WinKey+R > type taskschd.msc and press Enter (it will launch Task Scheduler)
    2. Left click from the right pane on the Task Scheduler Library > open Action from the top menu >New Folder... > name it MyTasks > click OK
    3. Left click on the MyTasks > choose Action from menu > Create Basic Task... (it will open task wizard)
    4. You can enter the Name , for example "Restart", and press Next
    5. In Trigger section you can specify when you want to run your task, for example:
      • Select Daily , and press Next
      • Now you can specify the day, the hour and set to recur every day, after that press Next
    6. In Action section you can choose what you want to run, for example restart your system, to do this:
      • choose Start a program , and press Next
      • in the Program/script field type shutdown /r , and press Next
    7. And that's all, you can press Finish

      Tuesday, November 11, 2014

      Multi Line comment in Shell Script

      We know that we can comment a line using '#' in Shell Script, but what if we want to comment a huge block of code? If we use '#' to comment that block then this can be very tedious task. Rather than using single line comment we can use multi line comment. In this tutorial i will show you how to use multi-line comment in Shell Script.

      In Shell Script multi line comment can be of form 

      <<'COMMENT'

      what ever written here is a comment

      COMMENT

      Let see example of multi line comment

      1. #!/bin/bash
      2. echo "Hii guys"
      3. #starting of mullti line commnent
      4. <<'COMMENT'
      5. read a
      6. echo "No line in this block will execute"
      7. COMMENT
      8. echo "Hello Guys"
      9. exit