07-12-2012
Please post desired output for this sample data.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
2. Shell Programming and Scripting
I am very new to Perl. I am struggling so hard to search a date (such as 10/09/2009, 10-09-2009) from a text file and replace with a string (say DATE) using Perl. Please help me out. Thanks in advance.
Regds
Doren (4 Replies)
Discussion started by: my_Perl
4 Replies
3. UNIX for Dummies Questions & Answers
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
Discussion started by: dashing201
4 Replies
4. Shell Programming and Scripting
I have file t1.log
Contents of t1.log file
Number of records processed:
Number of records rejected:
Error :
xyz ..........
abc ..........
aaa _]
start time :
end time :
Please let me know how i can remove the contents highlighted in red in the t1.log file.
Thanks
Sam (3 Replies)
Discussion started by: sam777
3 Replies
5. Programming
Hi,
I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o
At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies
6. Shell Programming and Scripting
Hi all, the value in the following file is just an example. It could be a different value/network addresses.
Here is my example of initial output in a file name net.txt
Initial Output, net.txt
The goal is to produce the following format which is to convert from CIDR to Netmask... (6 Replies)
Discussion started by: type8code0
6 Replies
7. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
8. Shell Programming and Scripting
Hello Forum.
I have a file called abc.sed with the following commands;
s/1/one/g
s/2/two/g
...
I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat
sed -f abc.sed abc.dat >... (10 Replies)
Discussion started by: pchang
10 Replies
9. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
10. UNIX for Beginners Questions & Answers
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
NET(5) File Formats Manual NET(5)
NAME
net - format of .net files read/written by Magic's netlist editor
DESCRIPTION
Netlist files are read and written by Magic's netlist editor in a very simple ASCII format. The first line contains the characters
`` Netlist File'' (the leading blank is important). After that comes a blank line and then the descriptions of one or more nets. Each
net contains one or more lines, where each line contains a single terminal name. The nets are separated by blank lines. Any line that is
blank or whose first character is blank is considered to be a separator line and the rest of its contents are ignored.
Each terminal name is a path, much like a file path name in Unix. It consists of one or more fields separated by slashes. The last field
in the path is the name of a label in a cell. The other fields (if any), are cell instance identifiers that form a path from the edit cell
down to the label. The first instance identifier must name a subcell of the edit cell, the second must be a subcell of the first, and so
on.
Instance identifiers are unique within their parent cells, so a terminal path selects a unique cell to contain the label. However, the
same label may appear multiple times within its cell. When this occurs, Magic assumes that the identical labels identify electrically
equivalent terminals; it will choose the closest of them when routing to that terminal. Further, after connecting to one of these termi-
nals Magic may take advantage of the internal wiring connecting them together and route through a cell to complete the net's wiring.
An example netlist file follows below. It contains three distinct nets.
----------------------------------------
Netlist File
alu/bit_1/cout
alu/bit_2/cin
regcell[21,2]/output
latch[2]/input
This line starts with a blank, so it's a separator.
opcode_pla/out6
shifter/drivers/shift2
----------------------------------------
SEE ALSO
magic(1)
4th Berkeley Distribution NET(5)