Sponsored Content
Full Discussion: Change the Values in a file
Top Forums Shell Programming and Scripting Change the Values in a file Post 302089289 by blowtorch on Monday 18th of September 2006 11:58:23 AM
Old 09-18-2006
Hi guys, this looks a lot like homework doesn't it? Having to satisfy specific requirements, no real-world application... homework. Thread closed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change values in certain column only in every line (any script)

Let say in a file I have lines of data like this : 13;2073;461496;15075341;3;001f7d3a;2042063674; 13;2074;461446;15080241;6;001ed33a;2042020154; 13;2075;461401;15085270;6;001f593b;2042054459; 13;2076;461381;15087160;6;001f7483;2042061443; 13;2077;461419;15083419;6;001eca1a;2042017818; I... (3 Replies)
Discussion started by: luna_soleil
3 Replies

2. Shell Programming and Scripting

How do I change the values in a file?

TRASH_PATH:~/deleted/ MAX_VERSIONS:5 FILE_MAX_SIZE:1024 FOLDER_MAX_SIZE:8096 TRASH_MAX_SIZE:1024 LOG_MAX_SIZE:100 how do i change the value of TRASH_MAX_SIZE to 2040 using the script? the filename is config.ini please advice Use code tags, ty. (5 Replies)
Discussion started by: classic
5 Replies

3. Shell Programming and Scripting

Perl script to change values in datafiles

Hi all, Let say I have 2 files, 1 is source file and another is destination file. Source file contains the following : Kitten Dogs Donkey Chicken Turkey And destination file contains : Kitten, 0 Dogs, 0 Donkey, 0 Chicken, 0 Turkey, 0 Kitten, 0 Dogs, 0 Donkey, 0 (16 Replies)
Discussion started by: luna_soleil
16 Replies

4. Shell Programming and Scripting

How to change values in datafile from source file

Hi all, I have this source file source.txt : hdrEthernetSwitch1IPAddress 112.13.9.34 hdrEthernetSwitch2IPAddress 112.13.8.245 noOfRevASLAvailable 8000 noOfRevASLInUse 122 maxDOSPayload 7777 pcmdEvdoRUM Enabled pcmdEvdoFlow Enabled And I have this datafile to be modified : ... (5 Replies)
Discussion started by: luna_soleil
5 Replies

5. Shell Programming and Scripting

Finding change in values

I have an array X = ( -100 -90 -80 -70 -60 -50 -40 30 40 50 60 70 80 90 100 ) I want to find the place where values change from negative to positive. (8 Replies)
Discussion started by: kristinu
8 Replies

6. Shell Programming and Scripting

Change nice values of a queue

Hello Guys I need your suggestions for the below We have few unix jobs running in different queues Is there any way I can manage which jobs goes to which queue and to change their nice value as well Thanks a lot for your valuable suggestions (1 Reply)
Discussion started by: Pratik4891
1 Replies

7. Shell Programming and Scripting

How to change certain values in a file

Hi all, i need help to replace certain values in a file. I need the script to check and match the ID and exNum1. if match, values in $3 (file2.txt) need to replace the value for 'START' (file1.txt) for each match. The sample structure is like this:- File1.txt ID P_6 START ... (4 Replies)
Discussion started by: redse171
4 Replies

8. Shell Programming and Scripting

Change values in .conf file with a script

This is my first time posting here...so be gentle. Suppose I have a test.conf file that contains a value such as a IP. I would like to be able to use the Dialog Utility in Linux to allow me to enter the new IP in a Dialog form...and the results get saved into the test.conf file in the place... (4 Replies)
Discussion started by: calahanp
4 Replies

9. UNIX for Beginners Questions & Answers

How to change values in xml file?

I have xml file like below, i want change the values at default-value place of each argument name using shell script. like where argument name= protocol and default-value=tcp, where argument name =port and default-value= 7223, where argument name = username and default-value=test, example ... (12 Replies)
Discussion started by: s1s2s3s4
12 Replies

10. Shell Programming and Scripting

Change 2 values in 2 different lines

Hello all, I have a file looks like a xml file: .... <SrcIntDef>WAUXDFXXX<\SrcIntDef> <SrcIntRep>WUBGIUNXXX<\SrcIntRep> ... For these 2 lines I will change the values. So for result it should look like: ... <SrcIntDef>WUBGIUNXXX<\SrcIntDef> <SrcIntRep>WAUXDFXXX<\SrcIntRep>... (4 Replies)
Discussion started by: API
4 Replies
Thread::Serialize(3pm)					User Contributed Perl Documentation				    Thread::Serialize(3pm)

NAME
Thread::Serialize - serialize data-structures between threads SYNOPSIS
use Thread::Serialize; # export freeze() and thaw() use Thread::Serialize (); # must call fully qualified subs my $frozen = freeze( any data structure ); any data structure = thaw( $frozen ); VERSION
This documentation describes version 1.00. DESCRIPTION
*** A note of CAUTION *** This module only functions if threading has been enabled when building Perl, or if the "forks" module has been installed on an unthreaded Perl. ************************* The Thread::Serialize module is a library for centralizing the routines used to serialize data-structures between threads. Because of this central location, other modules such as Thread::Conveyor, Thread::Pool or Thread::Tie can benefit from the same optimilizations that may take place here in the future. SUBROUTINES
There are only two subroutines. freeze my $frozen = freeze( $scalar ); my $frozen = freeze( @array ); The "freeze" subroutine takes all the parameters passed to it, freezes them and returns a frozen representation of what was given. The parameters can be scalar values or references to arrays or hashes. Use the thaw subroutine to obtain the original data-structure back. thaw my $scalar = thaw( $frozen ); my @array = thaw( $frozen ); The "thaw" subroutine returns the data-structure that was frozen with a call to freeze. If called in a scalar context, only the first element of the data-structure that was passed, will be returned. Otherwise the entire data-structure will be returned. It is up to the developer to make sure that single argument calls to freeze are always matched by scalar context calls to thaw. REQUIRED MODULES
Storable (any) Test::More (0.88) INSTALLATION
This distribution contains two versions of the code: one maintenance version for versions of perl < 5.014 (known as 'maint'), and the version currently in development (known as 'blead'). The standard build for your perl version is: perl Makefile.PL make make test make install This will try to test and install the "blead" version of the code. If the Perl version does not support the "blead" version, then the running of the Makefile.PL will *fail*. In such a case, one can force the installing of the "maint" version of the code by doing: perl Makefile.PL maint Alternately, if you want automatic selection behavior, you can set the AUTO_SELECT_MAINT_OR_BLEAD environment variable to a true value. On Unix-like systems like so: AUTO_SELECT_MAINT_OR_BLEAD=1 perl Makefile.PL If your perl does not support the "blead" version of the code, then it will automatically install the "maint" version of the code. OPTIMIZATIONS
To reduce memory and CPU usage, this module uses load. This causes subroutines only to be compiled in a thread when they are actually needed at the expense of more CPU when they need to be compiled. Simple benchmarks however revealed that the overhead of the compiling single routines is not much more (and sometimes a lot less) than the overhead of cloning a Perl interpreter with a lot of subroutines pre- loaded. To reduce the number of modules and subroutines loaded, an external Perl interpreter is started to determine the Storable signature at compile time. In some situations this may cause a problem: please set the $Thread::Serialize::no_external_perl variable to a true value at compile time before loading Thread::Serialize if this causes a problem. BEGIN { $Thread::Serialize::no_external_perl= 1 } use Thread::Serialize; KNOWN ISSUES
Embedded Perls Philip Monsen reported that in the case of an embedded Perl interpreter (e.g. in a C program), the use of an external executor to determine the Storable signature, causes problems. This has been fixed by introducing the global variable $Thread::Serialize::no_external_perl (see OPTIMIZATIONS). AUTHOR
Elizabeth Mattijsen, <liz@dijkmat.nl>. Please report bugs to <perlbugs@dijkmat.nl>. COPYRIGHT
Copyright (c) 2002, 2003, 2004, 2010, 2012 Elizabeth Mattijsen <liz@dijkmat.nl>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
load, Thread::Conveyor, Thread::Pool, Thread::Tie. perl v5.14.2 2012-06-11 Thread::Serialize(3pm)
All times are GMT -4. The time now is 03:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy