Re: Creating text files for windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12-Nov-2003/23:41 +1300, Mikevl <Mikevl@xxxxxxxxxxxxxxx> wrote:
>
>I am trying to create a text file that has several lines which can be viewed
>in Windows notepad.
>
>at the moment if I use echo or printf "hi there\nnext line"
>the poutut in notepad looks like "hi there[]next line"


For DOS/Win you need a carriage retrun and a line feed. Try this:

  printf "hi there\r\nnext line"


Tony
- -- 
Anthony E. Greene <mailto:Anthony%20E.%20Greene%20%3Cagreene@xxxxxxxxx%3E>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
AOL/Yahoo Messenger: TonyG05    HomePage: <http://www.pobox.com/~agreene/>
Linux. The choice of a GNU generation <http://www.linux.org/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Anthony E. Greene <mailto:agreene@xxxxxxxxx> 0x6C94239D

iD8DBQE/th84pCpg3WyUI50RAtrgAKDBFP0Qer96lt94VRX/fd/1IdqWsACfbY9x
DFdzLZ8AMNOwDnWTgyf+bnA=
=NKzK
-----END PGP SIGNATURE-----


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux