9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2. Shell Programming and Scripting
i have text file like this:
001_1_173 j nuh ]az
001_1_174 j ]esma. nuh ]/.xori
. and have another text
nuh word1... (6 Replies)
Discussion started by: alii
3. Shell Programming and Scripting
I tried below method;
mv -v /oracle1/scr/tilki/willsendtilkiNew/VOICE-MO_$nfname.gz \
$(echo /oracle1/scr/tilki/willsendtilkiNew/VOICE-MO_$nfname.gz | tr 'dat' 'txt');
nfame variable has the string "dat" .
I need to rename files like below;
ASIS: 20140902103700_100319.dat.gz... (8 Replies)
Discussion started by: snr_silencer
4. Shell Programming and Scripting
I am trying to use sed to replace a file path within all the .lay (.txt) files in a folder. I feel that this should be easy but I can't get it to work no matter what i try.
I'm using cygwin.
For a .txt file containing the below line I want to replace this file path with a new one.
... (1 Reply)
Discussion started by: carlr
5. Shell Programming and Scripting
My need is :
Want to change
I have some (about 250 files)xml files.
In FileOne it contains
<Context path="/PPP" displayName="PPP" docBase="/home/me/documents" reloadable="true" crossContext="true">... (1 Reply)
Discussion started by: linuxadmin
6. UNIX for Dummies Questions & Answers
I have a file like below. I want to replace all the '.' in the 3rd column with 'NA'. I don't know how to do that. Anyone has an iead? Thanks a lot!
8 70003200 21.6206
9 70005700 17.5064
10 70002200 .
11 70005100 19.1001
17 70008000 16.1970
32 70012400 26.3465
33... (9 Replies)
Discussion started by: forevertl
7. Shell Programming and Scripting
I have one base file, and multiple target files-- each have uniform line structure so no need to use grep to find things-- can just define sections by line number.
My question is quite simple-- can I use sed to copy a defined block of lines (say lines 5-10) from filename1.txt to overwrite an... (3 Replies)
Discussion started by: czar21
Hi, is there a bullet proof of getting the history of all commands entered by a user on a specific server and idealy with the times ?
We have several servers. Therefore we can simply logon to one and do RLOGINS to go to others. We always first logon to servers with our personnal login and then... (4 Replies)
Discussion started by: Browser_ice
9. Shell Programming and Scripting
How would I write a command(s) to read from a file (list) that looks like this: 29847374384 and grep from a second file (list) that looks like this: 29847374384, jkdfkjdf,3833,ddd:confused: (1 Reply)
Discussion started by: smellylizzard
dos2unix(1) General Commands Manual dos2unix(1)
dos2unix - DOS/MAC to UNIX text file format converter
dos2unix [options] [-c convmode] [-o file ...] [-n infile outfile ...]
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
This manual page documents dos2unix, the program that converts plain text files in DOS/MAC format to UNIX format.
The following options are available:
Print online help.
Keep the date stamp of output file same as input file.
Quiet mode. Suppress all warning and messages.
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates dos2unix under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
Get input from stdin and write output to stdout.
Convert and replace a.txt. Convert and replace b.txt.
dos2unix a.txt b.txt
dos2unix -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode. Convert c.txt from Mac to Unix
dos2unix a.txt -c iso b.txt
dos2unix -c ascii a.txt -c iso b.txt
dos2unix -c mac a.txt b.txt
Convert and replace a.txt while keeping original date stamp.
dos2unix -k a.txt
dos2unix -k -o a.txt
Convert a.txt and write to e.txt.
dos2unix -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
dos2unix -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
dos2unix a.txt -n b.txt e.txt
dos2unix -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
Benjamin Lin - <email@example.com>
Bernd Johannes Wuebben (mac2unix mode) <firstname.lastname@example.org>
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
1995.03.31 dos2unix v3.0 dos2unix(1)