![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert UNIX file format to PC format | Samtel | UNIX for Dummies Questions & Answers | 1 | 08-27-2009 03:29 PM |
| AWK CSV to TXT format, TXT file not in a correct column format | mdap | Shell Programming and Scripting | 1 | 08-14-2008 12:03 PM |
| To convert multi format file to a readable ascii format | gaur.deepti | UNIX for Dummies Questions & Answers | 5 | 03-25-2008 03:03 PM |
| Convert UTF8 Format file to ANSI format | rajreddy | UNIX for Dummies Questions & Answers | 9 | 05-25-2007 09:26 AM |
| Convert UTF8 Format file to ANSI format | rajreddy | UNIX for Advanced & Expert Users | 1 | 05-24-2007 07:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
SED - log file format
Hello everyone, I have a log file : Code:
\data\file\script\command_0001 \data\file\script\command_0002 \data\file\script\command_0003 I need to make all lines on this way Code:
\data\file\script\command_0001 \data\file\script\command_0002 \data\file\script\command_0003 I know this could be done with SED. But I am lost. Could you please help me on this ? Thanks |
|
||||
|
Code:
awk '{ printf "%s ", $0 }END{ printf "\n" }' filename
---------- Post updated at 07:14 PM ---------- Previous update was at 07:13 PM ---------- or this, Quote:
|
| Bits Awarded / Charged to matrixmadhan for this Post | |||
| Date | User | Comment | Amount |
| 4 Weeks Ago | Aswex | N/A | 1,000 |
|
||||
|
Dear Tytalus, Thanks for your reply. your code is also working great. Thanks ---------- Post updated at 09:09 AM ---------- Previous update was at 08:52 AM ---------- Dear Friends, If I may I have another question - The last one. Is there a way to make the file like it was ? I have now Code:
\data\file\script\command_0001 \data\file\script\command_0002 \data\file\script\command_0003 Is there a way to make it back like it was ? Code:
\data\file\script\command_0001 \data\file\script\command_0002 \data\file\script\command_0003 Sorry for that question, but I have a huge amont of lines and I want to be sure that there is no corruption of that file. Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|