Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Editing a file in a shell script Post 61731 by encrypted on Tuesday 8th of February 2005 03:45:46 AM
Old 02-08-2005
Or else, if you have perl
perl -p -i -e 's/oldtext/newtext/' <filename>
would change the file <filename> without creating a new file
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

editing a file via a shell script ??

Morning All: I know this might be easy but since I don't do this very often I get stumped real quick... Sun box Solaris 8 ksh... I need to edit a file via a shell script. In this file I need to locate one specific line and then remove that line plus the next 20 line below that.... Any... (2 Replies)
Discussion started by: jimmyc
2 Replies

2. Shell Programming and Scripting

dynamic editing using shell script

Hi, I would like to edit an input data-file by changing a variable in it in steps: For ex: If my input file is 'big.in', then it has the following data: 2.54 0.01 0.5 0.0 My source code then reads this above line, executes and gives out some output. Then , I want to increment... (1 Reply)
Discussion started by: habzone2007
1 Replies

3. UNIX for Dummies Questions & Answers

Editing & Saving using shell script

Hi, OS: Unix, linux, hp-unix (all unix flavours) Iam trying to change some string values, special characters or otherwise in a file. As of now, i go using vi <filename>, open the file and do the edit manually and save it. Is it possible to write a shell script so that i just run the script... (4 Replies)
Discussion started by: kenkanya
4 Replies

4. UNIX for Dummies Questions & Answers

Editing Shell Script

Hi I'm a newbie, but I understand that there's some space difference between unix and the pc, which is why I can't write shell script on my pc but I can view it using notepad, wordpad, etc. Is there any program I can use that will let me view the shell script and edit it without screwing up... (6 Replies)
Discussion started by: qtip
6 Replies

5. Shell Programming and Scripting

editing excel file through shell script

Hi, I am having a business file in excel having charts based on data already present on it. I would like to add new rows after the existing data and refesh the chart on it using shell script. For example-- In excel file in "sheet1", There is some data in first 10 rows ( from column A to F).... (0 Replies)
Discussion started by: sanjay1979
0 Replies

6. Shell Programming and Scripting

editing a file using shell script

HI all, I have file in the below format 1111111111_222222222_3333333 111111_22222_33333 11111111_222222_33333333333 i need to display this file like this 2222222_1111111111 22222_11111111 22222222222_1111111111111 can anyone help me with this Thanks in advance (1 Reply)
Discussion started by: saravanan71184
1 Replies

7. Shell Programming and Scripting

Problem with searching and then editing a file through shell.

Hi, I have searched through this forum as there are many similar entries but could'nt get one of them to work, either that or they were just different to what I needed. Basically I have a file, recordsDatabase. In this file are a few different fields. There is a unique identifier eg 001... (5 Replies)
Discussion started by: U_C_Dispatj
5 Replies

8. Shell Programming and Scripting

Editing a file on remote server using shell script locally

Hi All, I have below requirements for my project: 1. Building a shell script which connects to a remote server 2. running script on local machine as user 'A' 3. connecting to server using user 'B' with password 4. login with a powerbroker role 'P' (asks for same password as 'B') on that... (1 Reply)
Discussion started by: Nishant Ladiwal
1 Replies

9. Shell Programming and Scripting

Editing a file on remote server using shell script locally

Hi Scott, My previous post was not for any school or college projects. I am currently working with a IT company (Cannot provide more details than this). I am trying to implement the below script in my day-to-day work, Apologies for the confusion in previous post :). My question remains same... (4 Replies)
Discussion started by: Nishant Ladiwal
4 Replies

10. Shell Programming and Scripting

Font Editing to be done in shell script

Hi, Iam writing a script in unix shell and need to edit the output (With colors and bold/italic/underline) and send as email. Can someone please help me on this requirement Output as below. Need to know how to set this in echo command Message Flow: messageflow1 //need to put this in red... (7 Replies)
Discussion started by: Anusha M
7 Replies
Level(3pm)						User Contributed Perl Documentation						Level(3pm)

NAME
Perl::Destruct::Level - Allow to change perl's destruction level SYNOPSIS
use Perl::Destruct::Level level => 1; my $current_destruct_level = Perl::Destruct::Level::get_destruct_level(); DESCRIPTION
This module allows to change perl's internal destruction level. The default value of the destruct level is 0; it means that perl won't bother destroying all its internal data structures, but let the OS do the cleanup for it at exit. For perls built with debugging support ("-DDEBUGGING"), an environment variable "PERL_DESTRUCT_LEVEL" allows to control the destruction level. This modules enables to modify it on non-debugging perls too. Relevant values recognized by perl are 1 and 2. Consult your source code to know exactly what they mean. Note that some embedded environments might extend the meaning of the destruction level for their own purposes: mod_perl does that, for example. CAVEATS
This module won't work when used from within an END block. Loading the "threads" module will set the destruction level to 2. (This is to enable spawned threads to properly cleanup their objects.) Loading modules that load "threads", even if they don't spawn threads, will also set the destruction level to 2. (A common example of such a module is "Test::Builder".) AUTHOR
Copyright (c) 2007 Rafael Garcia-Suarez. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
perlrun, perlhack perl v5.14.2 2007-12-03 Level(3pm)
All times are GMT -4. The time now is 09:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy