Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:48:07+00:00 2026-06-03T13:48:07+00:00

I want to use a command to make a crontab that plays an alarm

  • 0

I want to use a command to make a crontab that plays an alarm (for my wife). The program is called ipraytime and it gives an output like this.

$ ipraytime -u +2

Prayer schedule for,
City             : Custom
Latitude         : 021�� 25' 12" N
Longitude        : 039�� 49' 47" E
Angle Method     : Umm Al-Qurra University
TimeZone         : UTC+2.0
Qibla            : 061�� 45' 42" W of true North

     Date         Fajr    Shorooq   Zuhr     Asr    Maghrib   Isha 
--------------------------------------------------------------------
[09-05-2012]     4:19     5:43    12:16    15:35    18:48    20:18

Today's Imsaak    :   4:11
Tomorrow's Imsaak :   4:10
Tomorrow's Fajr   :   4:18

What i want is that the times format good for a crontab which means i need to switch places of the minute and hour. To be 19 4 instead.

I have made this command but don’t know how to make that switch.

ipraytime -u +2| awk 'NR==12 {print $2"\n"$3"\n"$4"\n"$5"\n"$6"\n"$7}' | sed 's/:/ /g'

This gives me an output like this

4 19
5 43
12 16
15 35
18 48
20 18

But i want it to be like this

19 4
43 5
16 12
35 15
48 18
18 20

As that is what a crontab is using. I have played with sort a bit but couldn’t find a solution there either.

(Sorry for the bad topic.. didn’t know how to write a good one for this)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:48:09+00:00Added an answer on June 3, 2026 at 1:48 pm

    Use sed 's/\(.*\):\(.*\)/\2 \1/'

    Command:

    ipraytime -u +2 | awk 'NR==12 {print $2"\n"$3"\n"$4"\n"$5"\n"$6"\n"$7}' 
     | sed 's/\(.*\):\(.*\)/\2 \1/'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use ls in windows command prompt and make it run the
I started to use ADO.NET for 3 days and want to make a program
I want to know how the configuration command make menuconfig to make use of
I am setting a variable, and then I want to use the USE command
I want to use rails genrate command in gem development. Is it possible?
I want to use the following command: openssl x509 -noout -in /etc/pki/tls/certs/cert1.pem -enddate openssl
I want to use ADO.NET Prepare command will increase performance if query is repeatevely
I want to use an environment variable in a command with recursive search. export
I tend to use the bisect command in git extensively. Now I want to
i want to use the dos commands in my ansi-c program how can i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.