-3

I try to use dos2unix command on unix machine but it gives me error like --

 data_load]$ dos2unix a.csv a.csv
-bash: dos2unix: command not found

Then i use ---

data_load]$ yum search dos2unix
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile

=================================================== N/S Matched: dos2unix ===================================================
dos2unix.x86_64 : Text file format converter

Is there any way that i can use it and i can not log in as ROOT

mradul
  • 509
  • 4
  • 12
  • 28

1 Answers1

2

You could ask your sysadmin to install dos2unix. Apparently he didn't install it yet.

You might compile it from its source code. If it has a configure script (from autoconf) you might pass a --prefix=$HOME/soft argument to that script and later add $HOME/soft/bin/ to your $PATH.

Perhaps using tr(1) might be enough...

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
  • Do you know why it says not found but when i do yum search dos2unix then it says matches ? What is the reason and solution and if i could do it on my own because i have to make changes in the production ENV in my deliverable... – mradul Sep 16 '15 at 08:36
  • *not found* (given by your shell) means that your sysadmin did not install `dos2unix` (or that you messed up your [PATH](https://en.wikipedia.org/wiki/PATH_%28variable%29) to the point of removing `/usr/bin` from it). – Basile Starynkevitch Sep 16 '15 at 08:38
  • Then in production env they also need to install it as i am not aware if they have it or not ? – mradul Sep 16 '15 at 08:41