Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How can I apply 'date' command to specific columns, in a BASH script?

Shell Programming and Scripting


Tags
awk, bash, date, format, script

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 1 Week Ago   -   Original Discussion by richardsantink
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 June 2018, 4:36 AM EDT
Location: Aachen, Germany
Posts: 12,916
Thanks: 429
Thanked 3,966 Times in 3,647 Posts
If necessary, you can adapt above to your locale settings:



Code:
awk '
BEGIN   {"locale mon" | getline TMP
         for (i=split(TMP, MNUM, ";"); i; i--)  MON[MNUM[i]]=i
        }                          
'


Last edited by RudiC; 1 Week Ago at 03:34 AM..
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash to select text and apply it to a selected file in bash cmccabe Shell Programming and Scripting 4 09-29-2016 05:36 PM
Script to check for a specific number of columns in a file chatwithsaurav Shell Programming and Scripting 3 05-27-2015 06:07 AM
Perl script to accept specific columns from excel omkar.jadhav Shell Programming and Scripting 4 03-20-2015 12:36 PM
Read Two Columns - Apply Condition on Six other columns jacobs.smith Shell Programming and Scripting 2 01-02-2015 05:26 PM
Need to view command in history for specific date scriptor Shell Programming and Scripting 1 10-07-2013 08:26 AM



All times are GMT -4. The time now is 05:31 AM.