![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trailing spaces chopped off - MF to Unix FTP. | videsh77 | UNIX for Advanced & Expert Users | 14 | 01-08-2009 05:06 PM |
| Remove Trailing spaces after a delimiter | kiran_418 | UNIX for Dummies Questions & Answers | 1 | 04-29-2008 02:19 PM |
| Strip leading and trailing spaces only in a shell variable with embedded spaces | jerardfjay | Shell Programming and Scripting | 6 | 03-07-2005 02:24 PM |
| Adding Trailing Spaces to a file | 222001459 | UNIX for Dummies Questions & Answers | 1 | 11-04-2004 03:23 PM |
| Leading and Trailing Spaces | sleepster | Shell Programming and Scripting | 7 | 10-29-2003 11:48 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to remove trailing spaces
Hi,
I have a file like this (ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa ------------------------------------------------------------ 2007-06-30 00:00:00 I have a requirement where i need just the date. When i do: tail -1 filename|tr -s "" my problem doesnot solve.I am getting leading spaces before the date. I need an output like: 2007-06-30 00:00:00 Can anybody help me?? ![]() -- Mahek |
|
||||
|
you can try these as well
leading spaces : tail -1 file1| sed -e "s/^ *//" trailing spaces : tail -1 file1| sed -e "s/ *$//" |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| awk, awk trim, trim, trim awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|