Sponsored Content
Top Forums Shell Programming and Scripting generate new string from a text file Post 302139455 by radoulov on Sunday 7th of October 2007 06:25:29 AM
Old 10-07-2007
Code:
awk '/File #/{printf "%s %s is ",$1,$2;getline;print}' filename

Code:
sed -n '/File #/{N;s/ : found\n/ is /p;}' filename


Last edited by radoulov; 10-16-2007 at 04:46 PM.. Reason: sed added
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script to generate text file from excel file

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

Generate a XML file from a text file

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

How to generate multiple lines in a text file?

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

generate tabular output from an input text file in unix shell 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

KSH - help needed for creating a script to generate xml file from text file

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

a shell script to generate an excel sheet from a text file..

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

Search a string in a text file and add another string at the particular position of a line

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

Search a string in a text file and add another string at the end of line

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

Generate .csv file a text file

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

Search a string and display its location on the entire string and make a text file

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
Netlist::File(3pm)					User Contributed Perl Documentation					Netlist::File(3pm)

NAME
Verilog::Netlist::File - File containing Verilog code SYNOPSIS
use Verilog::Netlist; my $nl = new Verilog::Netlist; my $fileref = $nl->read_file (filename=>'filename'); DESCRIPTION
Verilog::Netlist::File allows Verilog::Netlist objects to be read and written in Verilog format. ACCESSORS
See also Verilog::Netlist::Subclass for additional accessors and methods. $self->basename The filename of the file with any path and . suffix stripped off. $self->name The filename of the file. MEMBER FUNCTIONS
See also Verilog::Netlist::Subclass for additional accessors and methods. $self->read Generally called as $netlist->read_file. Pass a hash of parameters. Reads the filename=> parameter, parsing all instantiations, ports, and signals, and creating Verilog::Netlist::Module structures. $self->dump Prints debugging information for this file. DISTRIBUTION
Verilog-Perl is part of the <http://www.veripool.org/> free Verilog EDA software tool suite. The latest version is available from CPAN and from http://www.veripool.org/verilog-perl <http://www.veripool.org/verilog-perl>. Copyright 2000-2012 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. AUTHORS
Wilson Snyder <wsnyder@wsnyder.org> SEE ALSO
Verilog-Perl, Verilog::Netlist::Subclass Verilog::Netlist perl v5.14.2 2012-05-04 Netlist::File(3pm)
All times are GMT -4. The time now is 05:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy