09-02-2008
hmm
control M characters are mess.. yes.. when copied from windows..
i have a simpler way to do this
dos2unix file1 >file2
mv file2 file1
tell me if it works for you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i need to change string in all files in current folder and all subfolders. i wrote the following script. It works good except it dont delete temp file from subfolders.
for z in `find . -type f -name "*.html" -o -name "*.htm"`; do
sed -e 's@abc@xyz@g' $z>temp;
mv temp $z;
done
any idea?... (1 Reply)
Discussion started by: crazynups
1 Replies
2. UNIX for Advanced & Expert Users
Hello all,
I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written.
I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Discussion started by: Bashar
2 Replies
3. Shell Programming and Scripting
Hi
I want to find ^M characters in all files in dir and subdirectory and replace .
In single file use this and change ,how can i cahnge in files under subdirectory.
perl -i -pe 's/^MZ//g' *.txt
sed -e 's/^M//g' filename >filename.new
Thanks in advance
MR (2 Replies)
Discussion started by: mohan705
2 Replies
4. Shell Programming and Scripting
I want to scan through all the files in the folder and replace all instances of $file_X within the file with the variable $X defined in my bash script on my debian 6.0 install.
For example, if the file contains $file_dep I want it to be replaced with the value of the variable $dep defined in my... (1 Reply)
Discussion started by: Spadez
1 Replies
5. Shell Programming and Scripting
Hello,
I do have several files in one folder each file contains measurement data.
for each file I would like to replace the character "," by "." ?
How can I do this and how can I do this for each file at once?
E.G. data_1.dat, data_x.dat (original version)
data_1out.dat, data_x_out.dat... (10 Replies)
Discussion started by: rollinator
10 Replies
6. Shell Programming and Scripting
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies
7. Shell Programming and Scripting
with in my files i have the data like this, starting with a pipe and ending the line with a pipe.
all i want is to replace the first and last pipe , remove those
trying to use following sed command, but it is only showing on the screen the entire data of the file as if it removed, but when i... (4 Replies)
Discussion started by: cplusplus1
4 Replies
8. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
9. Shell Programming and Scripting
I am trying to use the below sed command to replace all "|" to ^, in a folder had 50 dat files. when i tried with 1 file it worked but when i tried with wild card, is not working.
sed -i 's/"|"/\^/g' *.dat
Is this the proper way to use sed command thank you very much for help. (3 Replies)
Discussion started by: cplusplus1
3 Replies
10. UNIX for Beginners Questions & Answers
I am trying to work on a script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8 I want to substring the date part and
I want to replace with currentdate minus 15 days. Here is an example. iam using AIX server
$ cat temp.txt
RTG*888*TD8*20180201~... (1 Reply)
Discussion started by: Shankar455
1 Replies
LEARN ABOUT DEBIAN
e2tools
E2TOOLS(7) Miscellaneous Information Manual E2TOOLS(7)
NAME
e2tools - utilities to manipulate files in an ext2/ext3 filesystem
DESCRIPTION
E2tools is a simple set of GPL'ed utilities to read, write, and manipulate files in an ext2/ext3 filesystem. These utilities access a
filesystem directly using the ext2fs library. I wrote these tools in order to copy files into a linux filesystem on a machine that does not
have ext2 support. Of course, they can also be used on a linux machine to read/write to disk images or floppies without having to mount
them or have root access.
Supported functionality:
e2cp copy files
e2mv move files
e2rm remove files
e2mkdir
create directory
e2ln create hard links
e2ls list files/directories
e2tail output the last part of a file
In general, to specify a directory or file on an ext2 filesystem for the e2tools utilities, use the following form:
filesystem:directory_path
The filesystem can be an unmounted partition or a regular file that's been formatted to contain an ext2 filesystem. In general, if a com-
mand takes multiple file names on the command line, if the first one contains an ext2 file specification, the rest of the files are assumed
to be on the same filesystem until another one is explicitly stated:
/tmp/boot.img:/tmp/file1
/tmp/file2
/tmp/file3
/tmp/boot2.img:/tmp/file4
Files 1-3 are on /tmp/boot.img and the last file is on /tmp/boot2.img
SEE ALSO
e2cp(1), e2ln(1), e2ls(1), e2mkdir(1), e2mv(1), e2rm(1), e2tail(1).
AUTHOR
The e2tools were written by Keith Sheffield <sheff@pobox.com>.
This manual page was written by Lucas Wall <lwall@debian.org>, for the Debian project (but may be used by others).
March 2, 2005 E2TOOLS(7)