02-21-2007
change some record item
Hi all,
I have a file with over 10,000 line, but I would like to update/add some code number (such as 062 below) into the line with <phone number> below:
11111<name> john matin <name>
12345<phone number> 123456 <phone number>
34556 <address> 1234 lucky road <address>
11111<name> john matin <name>
12345<phone number> 062 123456 <phone number>
34556 <address> 1234 lucky road <address>
how to do it in script?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello,
I have a file with the following record:
a.txt
AAjohn10123403
AAmary10298411
AAcat120192a1030
AApeter094857
AAmaybb019485
I have a list called b.txt, if matched the name and it will change to new name (which is after space)
john1 cancel
cat12 cat12
peter peter
mary1... (5 Replies)
Discussion started by: happyv
5 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have the following basic script which is remove the fielld. How can I replace another value in the field? Thx!!
for file in `cat $listn.txt`
do
get_file -q $file
grep -v '<customer-id>13000</customer-id>' $file > $file.grep
done
echo All processed file done!!
input file:... (2 Replies)
Discussion started by: happyv
2 Replies
3. Shell Programming and Scripting
Hi experts.
I got a file (500mb max) and need to pivot it (loading into ORCL) and change BLANK delimiter to PIPE |.
Sometimes there are multipel BLANKS (as a particular value may be BLANK, or simply two BLANKS instead of one BLANK).
thanks for your input!
Cheers,
Layout... (3 Replies)
Discussion started by: thomasr
3 Replies
4. UNIX for Dummies Questions & Answers
Hello,
after 9 months of archiving 1000 files,
now, i need to change the order of fields in the header record.
some very large, space padded files.
HEADERCAS05212008D0210DOMEST01(spacepadded to record length 210)
must now be
05212008HEADERCASD0210DOMEST01(spacepadded to record length 210)
... (1 Reply)
Discussion started by: JohnMario
1 Replies
5. UNIX for Dummies Questions & Answers
%%START CBLOADER CBLOADER BRBAI2 000090
01,011600033,011600033,110516,0834,2,90,,2/
02,011600033,011103093,1,110317,0834,,2/
03,105581,,015,+00000416418,,,901,+00000000148,,,922,+000000
00354,,/
03,113806,,015,+00000559618,,,901,+00000000096,,,922,+000000
00621,,/... (1 Reply)
Discussion started by: sgoud
1 Replies
6. Shell Programming and Scripting
I've found 2 great discussions on this forum that are tied to my question, but for some reason, neither solution works for me.
I have a CSV file with many records, up to 150+ at some times. Many records have a value of H in $1. For those records, I need to add today's current date in $20. I'm... (4 Replies)
Discussion started by: mrvitas
4 Replies
7. Shell Programming and Scripting
Hi,
I need a script to start searching a word from the particular record on the result of first occurence i need to change the value in that record.
I have a input file like this
<properties>
<add key="DeliveryWithinDay" value="False" />
<add key="ABC" value="23:00:00 PM" />
<add... (5 Replies)
Discussion started by: NareshN
5 Replies
8. Shell Programming and Scripting
Hi! all
can any one tell me how to compare current record of column with next and previous record in awk without using array
my case is like this
input.txt
0 32
1 26
2 27
3 34
4 26
5 25
6 24
9 23
0 32
1 28
2 15
3 26
4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies
9. Shell Programming and Scripting
I have test.xml
<emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp>
<Join><id>101</id><city>london</city><date>06/06/14 2011</date></join>
<Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join>
<Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies
10. Shell Programming and Scripting
Hello,
I have some tab delimited text data,
file: final_temp1
aname val
NAME;r'(1,) 3.28584
r'(2,)<tab>
NAME;r'(3,) 6.13003
NAME;r'(4,) 4.18037
r'(5,)<tab>
You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Discussion started by: LMHmedchem
2 Replies
ToDo(3pm) User Contributed Perl Documentation ToDo(3pm)
NAME
Palm::ToDo - Handler for Palm ToDo databases.
SYNOPSIS
use Palm::ToDo;
DESCRIPTION
The ToDo PDB handler is a helper class for the Palm::PDB package. It parses ToDo databases.
AppInfo block
The AppInfo block begins with standard category support. See Palm::StdAppInfo for details.
Other fields include:
$pdb->{appinfo}{dirty_appinfo}
$pdb->{appinfo}{sortOrder}
I don't know what these are.
Sort block
$pdb->{sort}
This is a scalar, the raw data of the sort block.
Records
$record = $pdb->{records}[N]
$record->{due_day}
$record->{due_month}
$record->{due_year}
The due date of the ToDo item. If the item has no due date, these are undefined.
$record->{completed}
This is defined and true iff the item has been completed.
$record->{priority}
An integer. The priority of the item.
$record->{description}
A text string. The description of the item.
$record->{note}
A text string. The note attached to the item. Undefined if the item has no note.
new
$pdb = new Palm::ToDo;
Create a new PDB, initialized with the various Palm::ToDo fields and an empty record list.
Use this method if you're creating a ToDo PDB from scratch.
new_Record
$record = $pdb->new_Record;
Creates a new ToDo record, with blank values for all of the fields.
"new_Record" does not add the new record to $pdb. For that, you want "$pdb->append_Record".
SOURCE CONTROL
The source is in Github:
http://github.com/briandfoy/p5-Palm/tree/master
AUTHOR
Alessandro Zummo, "<a.zummo@towertech.it>"
Currently maintained by brian d foy, "<bdfoy@cpan.org>"
SEE ALSO
Palm::PDB(3)
Palm::StdAppInfo(3)
perl v5.10.1 2010-02-23 ToDo(3pm)