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 8969073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:32:32+00:00 2026-06-15T17:32:32+00:00

So right now I have: echo -n Enter Path (or File if in directory)

  • 0

So right now I have:

echo -n "Enter Path (or File if in directory) to Convert: " ; read FILE ; cat $FILE | awk '{print strftime("%c",$1)} {print}'

This prints the following, when a file or path is entered to be converted:

Tue 04 Dec 2012 09:48:43 PM PST
1354686523
Wed 05 Dec 2012 09:47:38 PM PST
1354772858
Thu 06 Dec 2012 09:47:39 PM PST
1354859259
Fri 07 Dec 2012 09:46:08 PM PST
1354945568

The above is just an example date. This is perfect, but how do I get this to be on the same line? So it shows each date in the file like this:

Tue 04 Dec 2012 09:48:43 PM PST  --  1354686523
Wed 05 Dec 2012 09:47:38 PM PST  --  1354772858
Thu 06 Dec 2012 09:47:39 PM PST  --  1354859259
Fri 07 Dec 2012 09:46:08 PM PST  --  1354945568

Thanks a lot!!

  • 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-15T17:32:33+00:00Added an answer on June 15, 2026 at 5:32 pm

    You could try:

    awk '{ printf "%s -- %s\n", strftime("%c",$1), $0 }' file
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I have this PHP: $columns = array(*/Data*/); echo json_encode($columns); And this is
Right now I have this: echo <a href='misc/removeWallComment.php?id= . $displayWall['id'] . &uID . $displayWall['uID']
Right now I have a PHP file that does a MYSQL query and then
Right now I have this SQL query which is valid but always times out:
How would I render favicons in Lithium? Right now I have this in my
How can I avoid mysql injections? This is the PHP file I have right
I have a simple form right now: <form action='<? echo $PHP_SELF;?>' method='POST'> Username:<input type='text'
Good day! I right now have a function the drags an element from a
Right now I have an upload field while uploads files to the server. The
Right now I have a script that will get the last five files in

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.