09-25-2013
Thank you both but when i try those command, it says it doesn't recognize the -o flag?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
Discussion started by: pharos467
2 Replies
2. Shell Programming and Scripting
I am trying to create a script to search for a string within a file, and if found, return the next two lines.
Example file:-
msj
mh
query
return this 1
return this 2
mjk
mhj
query
return this 3
return this 4
So the script would identify the string "query" and then return the lines... (10 Replies)
Discussion started by: daveaasmith
10 Replies
3. Shell Programming and Scripting
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (11 Replies)
Discussion started by: pharos467
11 Replies
4. Shell Programming and Scripting
Hi,
I am new to script and I want find one string from multiple files in diff directories and put that out put to new file.
Like I have A,B & C directories and each has multiple files but one file is unic in all the directories like COMM.txt
Now I want write script to find the string... (8 Replies)
Discussion started by: Mahessh123
8 Replies
5. Shell Programming and Scripting
Hello friends,
Plz suggest the find command,
How to search a string in a paticular string in miltiple files with current dirctory.:)
Thanks in advance.
Siva Ranganath Ch (2 Replies)
Discussion started by: sivaranga001
2 Replies
6. Shell Programming and Scripting
Hello friends,
I have find a paticular string from the files present in my user
for example:
a username and password is hardcoded in multiple files which present in the my user.so I have to search about username in which files it is available.there are several dirctories are there,so... (5 Replies)
Discussion started by: sivaranga001
5 Replies
7. Shell Programming and Scripting
Hi,
I'm fairly new to UNIX, but hopefully some-one can help me with this:
I am using the following code to find files with the name "example.xml":
find . -name "example.xml" -print
that would print me a list like the example here:
./dir1/dir2/example.xml... (5 Replies)
Discussion started by: boijie
5 Replies
8. Shell Programming and Scripting
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies
9. UNIX for Dummies Questions & Answers
Hello, newb here :o
How do I add square brackets before and after the first character in a string using sed?
e.g.
0123456
123456
My attempts have been fruitless.
sed 's/.\{0\}//'
Thanks. (2 Replies)
Discussion started by: shadyuk
2 Replies
10. Shell Programming and Scripting
Hi,
I am trying to script the below, but I am not very good at it :(
Your help would be greatly appreciated.
1. read all files in the directory in strings
strings *.*
2. in each file, for each line that contains "ABCD", store characters located at position 521 and 522 of this line... (9 Replies)
Discussion started by: clippertm
9 Replies
aft(1) General Commands Manual aft(1)
NAME
aft - "free form" document preparation system
SYNOPSIS
aft [--verbose] [--autonumber] [--output=file | --output=-] [--type=output-type] infile ..
DESCRIPTION
AFT is a nearly free format documentation system which can be typed in using any editor or wordprocessor that supports tabs or hard spaces
(column-based spaces whose number doesn't shrink or grow based on formatting). By using AFT, you are no longer constrained to one wordpro-
cessing file standard (such as Microsoft Word), nor do you have to enter a plethora of weird syntactical incantations of an embedded mark
up language (such as LaTeX or HTML).
Unlike other mark up languages, AFT is designed to parse and recognize patterns rather than formal commands. That is why there is no single
escape or command sequence that tells AFT what to do. In this regard, AFT will process almost anything you throw at it.
An AFT document is easily converted into such popular formats as HTML, RTF and LaTeX. Because there are few commands, learning to write a
document in AFT requires little effort. This doesn't mean that AFT is not powerful. In fact, this very document was conceived and written
using AFT.
USAGE
Running AFT is as simple as typing:
aft NAME_OF_YOUR_FILE.aft
OPTIONS
--verbose
Generate a lot of commentary. By default, AFT will just silently process files (unless errors occur). Using this option causes AFT
to keep you informed about what it is doing.
--autonumber
This switch tells AFT to automatically number your sections.--output=file |
--output=-
This tells AFT where to send its processed output. You can supply a filename (file) or - which tells AFT to write to your standard
output (your display or stdout).
--type=output_type
This tells AFT what type of output to do. For example HTML output is used for html and DocBook output is used for docbook. As a side
effect, this will also specify the file name extension for the output file if the --output option isn't specified.
infile ..
One or more AFT documents to be processed.
Almost Free Text 22. April 2003 aft(1)