Hello all
I need to search and replace in multiple files that are in directory hierarchy
Im using the :
find . -name "*.dsp" -print | xargs grep -n -o Test.lib" , I like to be able to replace every instance of Test.lib
with empty space .
how can I write one liner that does this ? (3 Replies)
I would like to know code that will delete multiple text from a comma delimited file. For example, how would the comma delimited file below delete the word 'PEST' in Perl language (previously an excel file that was converted to a csv and the last column was PEST):
1, 2,43,34, bosx,PEST
1,... (1 Reply)
Ok guys,
If anyone could help me out on this puppy I'd be very appreciative!
Here's the scenario
I have a string for example :
<img src=BLANK_IMG border=0 width=221 height=12>
or
<img src=IMG border=0 height=12 width=221 >
or anything else really....
need to basically change each... (10 Replies)
Dear all
My task is to replace a strings in multiple files.
filename: file1
I can use sed to replace abc.server.com to unix.server.org
e.g. sed 's/abc.server.com/unix.server.org/g file1 > newfile1
I have 2 questions. How do I
directly save file1 instead of append to newfile1. I... (1 Reply)
I need to replace a piece of text in many files, recursively, in a way that doesn't duplicate the files. How would I do that?
The closest I've come is
grep -rl "text" * | sed -e 's/home1/home2/g'
but that just replaces the filename. (2 Replies)
I need to replace (delete) a text block in a bunch of files, its a html table, almost at the end of pages but the location varies.
In Windows I used Filemonkey, but nothing like that in Unix?
There is replace from mysql, but how does it deal with newlines?
sed only works with single lines,... (6 Replies)
can anyone please help me in the below scenario:
File1:
Hello1
Hello1
i want to use sed to replace multiple occurances of Hello1 in file 1 to welcome.
Thanks a ton for the help (9 Replies)
I need to update about 2400 files in a directory subtree, with a new directory path inside the files
I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2
with this: /u01/PROD/apps/apps_st/10.1.3
I know how to change single words using "find . -type f -print0 |... (6 Replies)
I need help.
I have to delete multiple directories inside a directory that are two weeks old.
Example: Today is July 09, 2012
Folder1 > folder1 (created June 4, 2012) -- should be deleted
> folder2 (created June 2, 2012) -- should be deleted
> folder3 (created... (4 Replies)
Hi,
I have a file containing list of strings like
i:
Pink
Yellow
Green
and I have file having list of file names in a directory
j :
a
b
c
d
Where j contains of a ,b,c,d are as follows
a:
Pink (3 Replies)
Discussion started by: madabhg
3 Replies
LEARN ABOUT OPENDARWIN
ar
AR(5) BSD File Formats Manual AR(5)NAME
ar -- archive (library) file format
SYNOPSIS
#include <ar.h>
DESCRIPTION
The archive command ar combines several files into one. Archives are mainly used as libraries of object files intended to be loaded using
the link-editor ld(1).
A file created with ar begins with the ``magic'' string "!<arch>
". The rest of the archive is made up of objects, each of which is com-
posed of a header for a file, a possible file name, and the file contents. The header is portable between machine architectures, and, if the
file contents are printable, the archive is itself printable.
The header is made up of six variable length ASCII fields, followed by a two character trailer. The fields are the object name (16 charac-
ters), the file last modification time (12 characters), the user and group id's (each 6 characters), the file mode (8 characters) and the
file size (10 characters). All numeric fields are in decimal, except for the file mode which is in octal.
The modification time is the file st_mtime field, i.e., CUT seconds since the epoch. The user and group id's are the file st_uid and st_gid
fields. The file mode is the file st_mode field. The file size is the file st_size field. The two-byte trailer is the string "`
".
Only the name field has any provision for overflow. If any file name is more than 16 characters in length or contains an embedded space, the
string "#1/" followed by the ASCII length of the name is written in the name field. The file size (stored in the archive header) is incre-
mented by the length of the name. The name is then written immediately following the archive header.
Any unused characters in any of these fields are written as space characters. If any fields are their particular maximum number of charac-
ters in length, there will be no separation between the fields.
Objects in the archive are always an even number of bytes long; files which are an odd number of bytes long are padded with a newline
(``
'') character, although the size in the header does not reflect this.
SEE ALSO ar(1), stat(2)HISTORY
There have been at least four ar formats. The first was denoted by the leading ``magic'' number 0177555 (stored as type int). These ar-
chives were almost certainly created on a 16-bit machine, and contain headers made up of five fields. The fields are the object name (8
characters), the file last modification time (type long), the user id (type char), the file mode (type char) and the file size (type unsigned
int). Files were padded to an even number of bytes.
The second was denoted by the leading ``magic'' number 0177545 (stored as type int). These archives may have been created on either 16 or
32-bit machines, and contain headers made up of six fields. The fields are the object name (14 characters), the file last modification time
(type long), the user and group id's (each type char), the file mode (type int) and the file size (type long). Files were padded to an even
number of bytes. For more information on converting from this format see arcv(8).
The current archive format (without support for long character names and names with embedded spaces) was introduced in 4.0BSD. The headers
were the same as the current format, with the exception that names longer than 16 characters were truncated, and names with embedded spaces
(and often trailing spaces) were not supported. It has been extended for these reasons, as described above. This format first appeared in
4.4BSD.
COMPATIBILITY
No archive format is currently specified by any standard. AT&T System V UNIX has historically distributed archives in a different format
from all of the above.
BSD June 9, 1993 BSD