10-28-2011
Yes I am somewhat familiar with this command, but the data that I am replacing can't shift right or left. This file must stay as a fixed format to be read by other processes. So if i search for data in a file such as the name which starts at position 19 and ends at position 38 of this file. Replacement data CAN NOT go past position 38. example:
grep search results for "JOE S SMITH":
#'s - Indicate spaces
730000146104218006JOE#S#SMITH#########5230 BRUNSWICK LN MACUNGIE
Replace with "TIM KIM":
730000146104218006TIM#KIM#############5230 BRUNSWICK LN MACUNGIE
or
Replace with "JEROMANIA K KALAMAZOO"
730000146104218006JEROMANIA#K#KALAMAZO5230 BRUNSWICK LN MACUNGIE
Last edited by macastor; 10-28-2011 at 06:37 PM..
10 More Discussions You Might Find Interesting
1. Solaris
Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks
sample file:... (2 Replies)
Discussion started by: Gerry405
2 Replies
2. Shell Programming and Scripting
Hi everyone.
Could u be so kind and help me with on "simple" shell script?
1. i need to search a file line by line for a pattern.
example of a lines in that file
2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name
Values:snNo = f10
Add AttFlag = 0
2. i need to find... (0 Replies)
Discussion started by: dusoo
0 Replies
3. Shell Programming and Scripting
I have a file in which email messages are stored in. Every email is separated by by a ^Z character (Control-Z).
I need to extract all emails after the 65,00th one to another file and delete them from the original file.
Any suggests on accomplishing this? (2 Replies)
Discussion started by: maxcell
2 Replies
4. Shell Programming and Scripting
Hi All,
How do I search first string & second string and copy all content between them from one file to another file?
Please help me..
Thanks In Advance.
Regards,
Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies
5. UNIX for Dummies Questions & Answers
Dear unix gurus,
I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this:
adam peter
blah blah blah
blah blah blah
car
01 30 200
02 31 400
03 57 121
.. .. ..
.. .. ..
n y... (8 Replies)
Discussion started by: tintin72
8 Replies
6. Shell Programming and Scripting
Hi,
what I am trying to do in PHP, is to replace the Title. I need some of the URL information inside aswell depending on the domain.
The title is always different so I need to store it in a variable, put the url info like described below in front of it.
Here is an example how it should... (0 Replies)
Discussion started by: lowmaster
0 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
(o) Checkout an auto part: should prompt the user for the name of the auto part
and borrower's name:
Name:... (2 Replies)
Discussion started by: SlapnutsGT
2 Replies
8. Shell Programming and Scripting
hi people;
from my file:...
...
...
101221-18:45:17 192.168.1.1 1.0 PortNodeModel
=========================================================
Object Attribute Value
=========================================================
SectorPort=3 switchport 20
SectorPort=1 switchport 10
SectorPort=2... (12 Replies)
Discussion started by: gc_sw
12 Replies
9. Shell Programming and Scripting
Hallo Everyone.
I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text.
I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern>
... (5 Replies)
Discussion started by: gordom
5 Replies
10. 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
LEARN ABOUT OPENSOLARIS
whois
whois(1) User Commands whois(1)
NAME
whois - Internet user name directory service
SYNOPSIS
whois [-h host] identifier
DESCRIPTION
whois searches for an Internet directory entry for an identifier which is either a name (such as ``Smith'') or a handle (such as ``SRI-
NIC''). To force a name-only search, precede the name with a period; to force a handle-only search, precede the handle with an exclamation
point.
To search for a group or organization entry, precede the argument with * (an asterisk). The entire membership list of the group will be
displayed with the record.
You may of course use an exclamation point and asterisk, or a period and asterisk together.
EXAMPLES
Example 1 Using The whois Command
The command:
example% whois Smith
looks for the name or handle SMITH.
The command:
example% whois !SRI-NIC
looks for the handle SRI-NIC only.
The command:
example% whois .Smith, John
looks for the name JOHN SMITH only.
Adding ... to the name or handle argument will match anything from that point; that is, ZU ... will match ZUL, ZUM, and so on.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWrcmdc |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
SunOS 5.11 6 Nov 2000 whois(1)