10-07-2007
generate new string from a text file
Hi,
I have a file and the content looks like this:
line1
line2
File #5 : found
'/u01/testing.txt'
line5
line6
line7
File #12 : found
'/u01/testabc.txt'
line10
line11
I want to write a bash script to give me the output:
The file 5 is '/u01/testing.txt'
The file 12 is '/u01/testabc.txt'
As I am new in shell script, can anyone tell me how to do this?
Thanks!!
Walter
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have a excel file which has almost ten columns on the shared drive. I have to write a shell script to ftp that daily to unix server and then extract some columns from there and generate oracle standard text file. The columns should be in proper order and aligned properly, otherwise... (1 Reply)
Discussion started by: isingh786
1 Replies
2. Shell Programming and Scripting
FILE-1
USER username@foo.com
TOOLIN tool-a
TOOL2 tool-b
TOOL3 tool-c
TOOL4 tool-d
TOOL5 tool-e
USER username_2@foo.com
TOOLIN tool-e
TOOL2 tool-f
TOOL3 tool-c
TOOL4 tool-d
....
I need to take this file and generate a target XML file -
<access>
<managed>
... (3 Replies)
Discussion started by: jacki
3 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I want to create a file whose content is multiple lines of strings.
The string has the following pattern:
aaaa/bbbb/A-B.txt
A is a variable ranges from A1 to A2
B is a variable ranges from B1 to B2
Any ideas?
Thanks. (17 Replies)
Discussion started by: vic005
17 Replies
4. Shell Programming and Scripting
Hi,
I have the output (as below) which i want it to be in a table.
For e.g.
space utilization in PSE on path /logs is 0%
space utilization in PSE on path /logs/tuxedo/tuxlsp is 16%
space utilization in PSE on path /ldvarlsp/lsp/log is 37%
space utilization in PSE on path /home is 6%... (7 Replies)
Discussion started by: pkbond
7 Replies
5. Shell Programming and Scripting
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies
6. Shell Programming and Scripting
hi,
i have a text file that looks like this!
i want to generate an excel sheet out of it, removing all the junk data except the addresses
that look like
. Arrow Electrical Services
Rotating Machinery, Electrical Contracting & Mining Specialists
Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies
7. Shell Programming and Scripting
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies
8. Shell Programming and Scripting
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies
9. Shell Programming and Scripting
Hi guys,
I have a text file that states:
cat prod.hosts
11.29.130.14 host1 host1.test.com web17
11.29.130.15 host2 host2.test.com web18
11.29.130.16 host3 host3.test.com web19
I want a .csv file that states:
... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies
10. UNIX for Beginners Questions & Answers
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
LEARN ABOUT DEBIAN
urls_txt
URLS.TXT(5) File Formats Manual URLS.TXT(5)
NAME
urls.txt - URL database for regression testing
INTRODUCTION
The urls.txt file is installed by default in /etc/siege/urls.txt. When siege is invoked without a command line reference to a URL, then by
default it looks for urls in that file. The advantage of using the urls.txt file is two-fold: One, it frees you free retyping a url with
every invocation. And two, it allows you to conduct full site regression testing.
When the urls.txt file is used, siege reads all the urls in that file into memory and runs through the list in one of two ways, sequen-
tially or randomly. The default run is sequential from start to finish and back again until the --reps or the --time option has been satis-
fied. With the -i/--internet option selected, siege runs through the file randomly simulating the stress applied by a community of inter-
net users.
The -f/--file option allows you to select a file other then the default urls.txt file. You may also instruct siege to use a different file
with the "file" directive in .siegerc, i.e., "file = /usr/local/etc/urls.txt"
You may set and reference variables inside the urls.txt file. All variables must be declared BEFORE they are referenced. Variables are
declared with the "=" operator, VARIABLE = VALUE. They are then referenced inside $() or ${}, example: $(HOST), ${HOST}
HOST=joey.joedog.org
http://${HOST}/browse.jsp?size=5
http://${HOST}/admin.jsp?name=ralph
EXAMPLE FILE
This is an exmple urls.txt file. Lines beginning with a hash (#) are comments and ignored by siege.
#
# Example urls.txt file
# URLs database for siege
#
http://www.haha.com/index.html
http://www.haha.com/howto/index.html
http://www.haha.com/cgi-bin/howto/display.cgi?1013
www.haha.com/cgi-bin/fm.cgi?first=j.&last=fulmer
https://www.haha.com/index.shtml
https://www.whoohoo.com/my_whoohoo.jsp
# POST data requires a POST directive
www.haha.com/cgi-bin/foo.cgi POST first=bart&last=simpson
www.haha.com/hoho.jsp POST name=jeff&pass=secret
# POST the contents of a file using the
# line input character "<"
http://www.haha.com/my.jsp POST </home/jeff/data.txt
AUTHOR
Jeffrey Fulmer <jeff@joedog.org>, et al.
BUGS
Report bugs to jeff@joedog.org. Give a detailed description of the problem and report the version of siege that you are using.
COPYRIGHT
Copyright (C) 2007 Jeffrey Fulmer, et al.
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; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
AVAILABILITY
The most recent released version of siege is available by anonymous FTP from ftp.joedog.org in the directory pub/siege.
SEE ALSO
siege(1) siege.config(1) layingsiege(7)
Siege v2.70 April-17-2012 URLS.TXT(5)