chebe: (Default)
[personal profile] chebe posting in [community profile] command_liners
Hey all, don't think I've seen this here before, and I know there are many ways of doing this, so I thought, in a fit of geekery, that it might be fun to try and collect them all! Afterall everyone does have their own favourite programs.

I posted this at my own journal when I first came across it, but here's a new one as well;

sed -i 's/\r//' $file_name

perl -pi -e 's/\r\n/\n/g' $file_name

Date: 2011-04-28 08:48 pm (UTC)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)
From: [personal profile] sophie
I normally have the programs dos2unix and unix2dos installed for this; they're pretty commonly found. It is, of course, a simple task to do yourself, but still :D

dos2unix and unix2dos

Date: 2011-04-28 11:24 pm (UTC)
From: [personal profile] babysprite

Both have been ported to the system I'm currently logged into and these go a long way to eliminate a lot of repetitive tasks within a file or document.

A editor/programmer can also use !fmt from within the vi or vim text editor along with navigation keystrokes, depending upon the amount of text that needs to be formatted.

From the ba$h shell, one can use fmt [option][old filename] > [new filename].

Date: 2011-04-29 12:30 pm (UTC)
doldonius: (Default)
From: [personal profile] doldonius
Also, there are fromdos & todos if these two aren't available in some distro.

Profile

command_liners: A command line prompt with a blinking cursor after it, green against black. (Default)
Command Liners

January 2022

S M T W T F S
      1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 17th, 2025 12:04 am
Powered by Dreamwidth Studios