![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | 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 here. Shell Script Page. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| adding spaces for a variable value | dnat | Shell Programming and Scripting | 2 | 02-26-2008 01:32 AM |
| Adding spaces to record | nvenkat010 | Shell Programming and Scripting | 3 | 01-28-2008 09:24 AM |
| Adding an extra route to the ip routing table | Japie89 | IP Networking | 2 | 10-18-2007 04:16 PM |
| adding spaces to a line | mgirinath | Shell Programming and Scripting | 4 | 03-23-2007 08:38 AM |
| Adding Trailing Spaces to a file | 222001459 | UNIX for Dummies Questions & Answers | 1 | 11-04-2004 11:23 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Adding character to spaces in a table
Hi All,
I am trying to get the spaces in the below table to be fill up with a character " - ". For eg, coordinates 0202 is a space but i would want to fill up with " - ". Can anybody help ? Input: Code:
04 D H 03 C G K 02 B L 01 A E I 01 02 03 04 Code:
04 D H - - 03 C G K - 02 B - L - 01 A E I - 01 02 03 04 |
| Forum Sponsor | ||
|
|
|
|||
|
Hi,
Try this, sed '/^0/s/ / -/g' filename . Hi, Can anybody suggest me how to leave the last line in the substitution. Requirement is to do substitution in all the lines except the last line. I tried sed '!$s/ / -/g' filename ....But its not working ..giving syntax error Thanks Penchal |
|||
| Google UNIX.COM |