You are not logged in.

#1 2009-05-25 21:16:26

Cbeck527
Member
From: USA
Registered: 2009-05-25
Posts: 7
Website

unix2dos

Is it available via pacman? A search of the forums returned a few things about dos2unix, but not the reverse. Dell's biosdisk utility needs /usr/bin/unix2dos to create a BIOS upgrade boot image.

Thanks,
Cbeck


Dell Vostro A90 | 2GB RAM | 16GB Runcore SSD

Offline

#2 2009-05-25 21:30:40

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: unix2dos

Hi,  try this...

sudo pacman -Ss dos2unix
extra/hd2u 1.0.3-1
Dos2Unix text file converter

All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2009-05-25 21:34:47

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: unix2dos

BTW, it works both ways.  dos2unix or unix2dos.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#4 2009-05-25 21:44:13

Cbeck527
Member
From: USA
Registered: 2009-05-25
Posts: 7
Website

Re: unix2dos

[chris@babybeck ~]$ sudo pacman -S hd2u
Password: 
warning: hd2u-1.0.3-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): hd2u-1.0.3-1  

Total Download Size:    0.00 MB
Total Installed Size:   0.02 MB

Proceed with installation? [Y/n] 
checking package integrity...
(1/1) checking for file conflicts                   [#####################] 100%
(1/1) upgrading hd2u                                [#####################] 100%
[chris@babybeck ~]$ unix2dos
bash: unix2dos: command not found

Am I being an idiot and doing something completely wrong? It's quite possible smile


Dell Vostro A90 | 2GB RAM | 16GB Runcore SSD

Offline

#5 2009-05-25 22:16:13

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: unix2dos

loafer wrote:

BTW, it works both ways.  dos2unix or unix2dos.

unix2dos would not work unless you manually aliased it to dos2unix --u2d (or dos2unix -D).

% pacman -Ql hd2u
hd2u /usr/
hd2u /usr/bin/
hd2u /usr/bin/dos2unix

% dos2unix -h
...
    --u2d, -D    perform DOS -> UNIX conversion
...

Last edited by tdy (2009-05-25 22:19:42)

Offline

#6 2009-05-25 22:19:45

Majorix
Member
Registered: 2008-01-31
Posts: 96

Re: unix2dos

Running MS Office on the Windows side (maybe also OOo, you have to check), copy&pasting the contents to the workspace would sort it out.

Offline

#7 2009-05-25 22:49:25

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: unix2dos

Majorix: Either you don't understand the utility, or you've been doing it in a massively bloated fashion.

Offline

#8 2009-05-26 00:16:23

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: unix2dos

a quickie replacement for dos2unix:
tr -d '\r'

Last edited by perbh (2009-05-26 00:17:23)

Offline

#9 2009-05-26 00:19:39

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: unix2dos

Another set of replacements:

dos2unix() { awk "{ sub(\"\r\$\", \"\"); print }" $1 > $2; }
unix2dos() { awk "sub(\"\$\", \"\r\")" $1 > $2; }

Offline

Board footer

Powered by FluxBB