Field changes for sybase syslogins file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Field changes for sybase syslogins file
# 1  
Old 06-04-2008
Field changes for sybase syslogins file

Hello,

I have extracted the first line of the syslogins file and wish to use this as an example but the field change applies to the whole file. I wish to change the second field for all lines from 0 to 2 , the 0 field is constant for all lines. Also I wish to change the encrypted password field from
4805776c1c18a947f68ea75823a302c102808053b25347d3160457842c29
to
21053b3230a3f960cda6fc3f6c7adaf93add69cf2a1742147459d4f5ded5
for all lines in this file, however this field is unique and is differrent for all lines however the field position is in the same position.
I have included a pre and post change for the first line of the file as an example. How would I go about making this change, your help is much appreciated.
Oky

Pre- change

3 0 Oct 29 1998 3:02:57:163PM 21428 3278803 0 0 0 idb invsa 4805776c1c18a947f68ea75823a302c102808053b25347d3160457842c29
Jun 20 2004 11:41:33:490PM 0

Post - change

3 2 Oct 29 1998 3:02:57:163PM 0 0 0 0 0 idb invsa 21053b3230a3f960cda6fc3f6c7adaf93add69cf2a1742147459d4f5ded5 Jun 20 20
04 11:41:33:490PM 0
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

2. Linux

How do I format a Date field of a .CSV file with multiple commas in a string field?

I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below: column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10 "12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Discussion started by: dhruuv369
3 Replies

3. Shell Programming and Scripting

Plz Help. Compare 2 files field by field and get the output in another file.

Hi Freinds, I have 2 files . one is source.txt and second one is target.txt. I want to keep source.txt as baseline and compare target.txt. please find the data in 2 files and Expected output. Source.txt 1|HYD|NAG|TRA|34.5|1234 2|CHE|ESW|DES|36.5|134 3|BAN|MEH|TRA|33.5|234... (5 Replies)
Discussion started by: i150371485
5 Replies

4. Shell Programming and Scripting

Compare two files Field by field and output the result in another file

Hi Friends, Need Help. I have file1.txt as File1.txt |123|A|7267|Hyder|Cross|Sell|7801 |995|A|7051|2008|Lunar|New|Year|Promotion|7801 |996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801 |997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801 File2.txt... (7 Replies)
Discussion started by: i150371485
7 Replies

5. Shell Programming and Scripting

Sybase isql writing spaces to file

I'm running isql in sybase on a Linux box to read a table, and write the contents to a file. It needs to be a nice comma delimited file for input into another system. It reads the DB fine and writes the file. However, I have two issues. 1) I don't want the line width to be limited in any... (2 Replies)
Discussion started by: Cynthia
2 Replies

6. Shell Programming and Scripting

sybase shell line 19: unexpected end of file

Hi, As i am new to this forum i dont really know where to place this doubt i am facing ,Please consider this In this code i am connecting two time to two different server / database and getting the .sql file where am i going wrong please guide..... me. thanks a lot if ; then echo... (2 Replies)
Discussion started by: oracle_coorgi
2 Replies

7. Shell Programming and Scripting

Append 1st field from a file into 2nd field of another file

Hi, I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much. Actually, I'm in short with time. So I had to post my case. Hoping that you can help. I have 2 files, FILE1 ... (1 Reply)
Discussion started by: amurib
1 Replies

8. Shell Programming and Scripting

Appending 1st field in a file into 2nd field in another file

Hi, I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much. Actually, I'm in short with time. So I had to post my case. Hoping that you can help. I have 2 files, FILE1 ... (0 Replies)
Discussion started by: amurib
0 Replies

9. Shell Programming and Scripting

Sybase Interface file and converting in text format.

Does anyone knows how to decode the address in interface file using shell , i have done it using perl but can it be done in shell. master tli tcp /dev/tcp \x00021004ac1414230000000000000000 query tli tcp /dev/tcp \x00021004ac1414230000000000000000 (0 Replies)
Discussion started by: dinjo_jo
0 Replies

10. Shell Programming and Scripting

get the data from sybase and append to the file

How to get the data from the sybase database and append the data obtained into the file. For example, I will get the filename 'temp' from the database. This filename is associated with the number 1.6... This number 1.6 needs to be copied into the file that matches the filename in the... (1 Reply)
Discussion started by: vinay123
1 Replies
Login or Register to Ask a Question
Class::Field(3pm)					User Contributed Perl Documentation					 Class::Field(3pm)

NAME
Class::Field - Class Field Accessor Generator SYNOPSIS
package Thing; use Class::Field qw'field const'; field 'this'; field 'list' => []; field 'map' => {}; field 'that', -init => '$self->setup_that'; field 'circular_ref' => -weaken; const 'answer' => 42; DESCRIPTION
Class::Field exports two subroutines, "field" and "const". These functions are used to declare fields and constants in your class. Class::Field generates custom code for each accessor that is optimized for speed. FUNCTIONS
o field Defines accessor methods for a field of your class: package Example; use base 'Parent'; use Class::Field qw'field const'; field 'foo'; field bar => []; sub lalala { my $self = shift; $self->foo(42); push @{$self->{bar}}, $self->foo; } The first parameter passed to "field" is the name of the attribute being defined. Accessors can be given an optional default value. This value will be returned if no value for the field has been set in the object. o const const bar => 42; The "const" function is similar to <field> except that it is immutable. It also does not store data in the object. You probably always want to give a "const" a default value, otherwise the generated method will be somewhat useless. NOTE
This code was taken directly out the Spiffy module for those people who just want this functionality without using the rest of Spiffy. AUTHOR
Ingy dA~Xt Net <ingy@cpan.org> COPYRIGHT
Copyright (c) 2006, 2008, 2009. Ingy dA~Xt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.10.1 2009-12-10 Class::Field(3pm)