08-13-2009
Need to cut a string from a file recursively.
I have a file exep_file.txt with contents similar to,
[8/13/09 2:00:08 AM] [Thread1] xyx request 1329207.
[8/13/09 2:00:09 AM] [116271:RT1329207] sdf sedf sg gds request 1329207.
[8/13/09 2:00:11 AM] [116271:RT1329207] as as fa df sdf request 1329207.
[8/13/09 2:00:15 AM] [Thread0] xyx request 1329209.
[8/13/09 2:00:15 AM] [116271:RT1329209] sdf sedf sg gds request 1329209.
[8/13/09 2:00:16 AM] [116271:RT1329209] as as fa df sdf request 1329209.
I need an output like
1329207
1329209
only the request id's. How to cut only the request part,
Kindly help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need a script that will replace all occurances of a string in all filenames and foldernames, recursively.
Right now I have this script:
for f in `find -name *eye*`; do
echo processing $f
g=`expr "xxx$f" : 'xxx\(.*\)' | tr 'eye' 'm'`
mv "$f" "$g"
done
The problem is that tr... (2 Replies)
Discussion started by: TheMJ
2 Replies
2. Shell Programming and Scripting
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Discussion started by: ozzy80
9 Replies
3. Shell Programming and Scripting
Hi ,
I have a directory structure as dir and subdirectories and files under it and so on.now I need to find the files which contain the search string under every dir and subdir and replace .
my search string is like
searchstring=/a/b
string to be replaced=/a/c/b
please help.
... (7 Replies)
Discussion started by: mohanpadamata
7 Replies
4. Shell Programming and Scripting
Hi,
I want a help in this forum for my below issue.
1. I have a file where I'm searching for a text .
2. When I get the line where the above string is present I want to cut
some texts from the line where the particular string was found.
These above two steps will repeat in the... (2 Replies)
Discussion started by: bhaski2012
2 Replies
5. UNIX for Advanced & Expert Users
i have a file named keyword.csv(contains around 8k records) which contains a no. of columns.
The 5th column contains all the keywords.
I want to recursively search these keywords in all .pl files(around 1k) and display the filename....Afterthat i will use the filename and some of the column from... (3 Replies)
Discussion started by: millan
3 Replies
6. Shell Programming and Scripting
I need to cut all the Strings in one file and Paste it in the another file in the Specific line by replacing the specific String. For Example
Step 1: From the newfile.txt, i need to copy all the strings
newfile.txt
How are you, I am fine, How is your work
newfle2.txt
Hello david,... (2 Replies)
Discussion started by: Padmanabhan
2 Replies
7. Shell Programming and Scripting
Hi in a directory i've files having the following name
for_category_info_19990101984301
for_catgry_meta_19991111214601
-------
I just want the name till year and month i.e;
for_category_info_199901
for_catgry_meta_199911
How can i achieve the above string
Thanks (2 Replies)
Discussion started by: smile689
2 Replies
8. Shell Programming and Scripting
Hi all,
I wanted to find and replace an email id from entire directory structure on a Linux server. I found that find . -type f -print0 | xargs -0 sed -i 's/abc@yahoo.com/xyz@gmail.com/g' would do it perfectly.
But my search criteria has extended and now I want to search for a string1 like... (2 Replies)
Discussion started by: pat_pramod
2 Replies
9. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I hope somebody would be able to help me.
I would need to search a string coming from a file, example file.txt:
dog
cat
goat
horse
fish
For every string, I would need to know if there are any files inside a directory(recursively) that contains the string regardless of case.... (9 Replies)
Discussion started by: kokoro
9 Replies
LEARN ABOUT DEBIAN
obprobe
obprobe(1) User's Reference Manual obprobe(1)
NAME
obprobe -- create electrostatic probe grid
SYNOPSIS
obprobe [OPTIONS] type pchg filename
DESCRIPTION
The obprobe tool creates a grid around a molecule, placing a probe atom with a specified atom type and partial charge at each point to calcu-
late the MMFF94 energy. This can be used for docking experiments to test hydrogen-bond affinity, electrostatic potential, etc. Output is
sent to standard output using the Gaussian Cube format.
OPTIONS
If no filename is given, obprobe will give all options including the example probes.
-s stepsize
Set the resolution of the grid (stepsize)
-p padding
Set the padding -- extra distance on each side of the box formed by the molecule.
type MMFF94 atom type
pchg MMFF94 partial charge
EXAMPLES
Probe the file pyridines.sdf using a carbonyl oxygen -- a hydrogen bond acceptor with partial charge -0.57:
obprobe 7 -0.57 pyridines.sdf
Probe the file pyridines.sdf using a phenyl carbon atom -- a hydrophobic atom with no partial charge:
obprobe 37 0.0 pyridines.sdf
SEE ALSO
babel(1).
The web pages for Open Babel can be found at: <http://openbabel.org/>
AUTHORS
The obprobe program was contributed by Tim Vandermeersch.
Open Babel is developed by a cast of many, including currrent maintainers Geoff Hutchison, Chris Morley, Michael Banck, and innumerable oth-
ers who have contributed fixes and additions. For more contributors to Open Babel, see <http://openbabel.org/wiki/THANKS>
COPYRIGHT
Copyright (C) 2006-2008 by Tim Vandermeersch
Some portions Copyright (C) 2004-2008 by Geoffrey R. Hutchison and other contributors.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Open Babel 2.2 July 4, 2008 Open Babel 2.2