![]() |
|
|
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 |
| FC card not working properly | Mike1234 | HP-UX | 4 | 07-16-2008 12:42 AM |
| Cron - Not working properly | risshanth | HP-UX | 23 | 10-31-2007 06:34 AM |
| Telnet is not working properly | deepak_pathania | UNIX for Dummies Questions & Answers | 1 | 10-05-2007 06:59 PM |
| y is this not working properly? | C|[anti-trust] | High Level Programming | 3 | 05-18-2005 01:55 PM |
| Keyboard not working properly... | timresh | UNIX for Dummies Questions & Answers | 2 | 02-25-2005 07:28 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
\n not working properly
Hi all, I'm trying to generate a series of txt files starting from a plain csv file part of my code: Code:
#!/bin/ksh
INSTALLDIR=/Users/ME/Installdir
CSV=CSV.csv
TMP=/tmp/$(basename $0).txt
tr -s "\r" "\n" < /$INSTALLDIR/$CSV > $TMP
function Makefiles
{
printf '%24s:%30s\n' "sometext"
printf '%24s:%30s\n' "somemoretext" "$1"
etc...
}
Problem lies in the \n of the printf bit. I'm running this script in OSX to generate the files needed, but they're to be used in a winXP program. They generate fine in OSX but when I open them in winXP using notepad or something alike, every "new line" I should be getting is replaced by this vertical rectangle (don't know how it's actually called, but you can see them e.g. in fonts not covering all writing symbols). Needless to say I get all my text on one line with a rectangle in between, instead of on two lines. Any idea how to get this solved? thanks in advance! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|