|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Concat required
Hi Folks The below is code is giving me value 30. Code:
cal | sed '/^$/d' | tail -1 | awk '{printf $NF-1}'Actually the text is like below. Code:
echo "you should reply on 30-Jan-2013 evening EST. Here how should i con-cat above logic in that text? Last edited by Scott; 01-21-2013 at 05:38 AM.. Reason: Code tags, please... |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Quick and dirty: Code:
echo "You should reply on $(date "+$(cal|awk 'NF{l=$NF}END{print l-1}')-%b-%Y") evening EST"Last edited by elixir_sinari; 01-21-2013 at 05:45 AM.. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Concat | kmsekhar | Shell Programming and Scripting | 4 | 07-25-2011 02:22 PM |
| Awk Concat | posner | Shell Programming and Scripting | 3 | 07-28-2010 05:25 PM |
| Getting required fields from a test file in required fromat in unix | rdhanek | Shell Programming and Scripting | 7 | 07-22-2009 11:35 AM |
| Script required to get a required info from file. Pls. help me. | ntgobinath | Shell Programming and Scripting | 2 | 05-31-2008 08:34 AM |
| Concat | dhananjaysk | Shell Programming and Scripting | 1 | 03-20-2006 06:42 AM |
|
|