Sponsored Content
Full Discussion: change requires with perl
Top Forums Shell Programming and Scripting change requires with perl Post 302238161 by learnbash on Friday 19th of September 2008 06:08:29 AM
Old 09-19-2008
change requires with perl

Hi,

i need to change a file with perl having contents below, but it will not do any action if change is being already made.

file.txt
AAAAAA
BBBBBB
CCCCCC

output.txt (that required)

AAAAAA
#BBBBB
DDDDDD

CCCCCC


Thanks,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

New User Requires Help

Hi, I am a new Unix user and I would like to know which link to go to in order to learn Unix online. Something like tutorials for beginners (1 Reply)
Discussion started by: John K. Mbuki
1 Replies

2. Shell Programming and Scripting

how to change working directories in perl?

i am new to perl. i am writing a perl script. i want to know how to change the working directories? for ex. i have a perl script in c:\proj\ . i want to run this script in this directory but i need my script to change its working directory to D:\xyz\ dynamically in the script. your help is... (1 Reply)
Discussion started by: megastar
1 Replies

3. Shell Programming and Scripting

Change word in list - PERL

Hi, probably a newbie question..... But there it goes. :o I have a list words. This list is taken out of a file with grep and cut. my @system = (`grep up system_list| cut -d':' -f1` ); system= sm00xp03 sm01ftp02 sm00ssh12 What I want to have is a list, with each of the words in the... (1 Reply)
Discussion started by: pmpx
1 Replies

4. Shell Programming and Scripting

change in file requires

Hi, i have one file, filename -> a.txt, i want that simple way just enter command and it will do that, not through redirection way. AAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCCCCCCCC DDDDDDDDDDDDDDDDDDDDDDD EEEEEEEEEEEEEEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF i want... (10 Replies)
Discussion started by: learnbash
10 Replies

5. Shell Programming and Scripting

how to change time hr:mm to mm:hr in perl

Hi I want to match time hr:mm and change to mm:hr please let me know how to do that in perl (2 Replies)
Discussion started by: lakshmikant
2 Replies

6. Programming

how to change Editor in perl

i have following code that runs fine on my Ubuntu workstation. However when i run this on a HPUX it wont open the text file i am trying to open for editing. I figured i just have to change gvim editor to vi, but that didnt work out well. Can some one help me out here? This is written in Perl ... (1 Reply)
Discussion started by: usustarr
1 Replies

7. Shell Programming and Scripting

Change Directory in Perl

Hi Can any one please support: From Windows, I am running perl script located in C:/scripts directory and need to run a command "ls | sort | uniq" on the files in D:/temp directory. #!c:\perl\bin\perl.exe $file_dir="D:\\temp"; $command1="cd"; $command2="ls | sort | uniq";... (2 Replies)
Discussion started by: sureshcisco
2 Replies

8. Shell Programming and Scripting

Perl- Nested 'for' order change

Hello, I'm quite new to perl so my question is rather basic and I know there is probably a simple way around it but I can't seem to find it. I have a medium-length code and there is a part that works with a nested for loop: foreach my $j(@primpiddelta){ for (my $k=1;... (0 Replies)
Discussion started by: acsg
0 Replies

9. Shell Programming and Scripting

Perl to change a value in a file

Hi, I have a file with the following line open (unit=2, file='t0_p0.DAT')I want to change the value of the above zeros with variables $i and $j using a simple perl one linear. I've tried the following but it doesn't work perl -i -pe "/open/&&s/t\d+_p\d+/t$j_p$i/" fileThanks! (3 Replies)
Discussion started by: lost.identity
3 Replies

10. Shell Programming and Scripting

Perl : Global symbol requires explicit package name Error while executing

I have executed the below perl script for copying the file from one server to another server using scp. #!/usr/bin/perl -w use Net::SCP::Expect; use strict; $server= "x.x.x.x"; my $source = "/mypath/mypath"; my $destination = "/home/"; print "Login...Starting scp..."; $user="admin";... (1 Reply)
Discussion started by: scriptscript
1 Replies
asadmin-reconfig(1AS)						   User Commands					     asadmin-reconfig(1AS)

NAME
asadmin-reconfig, reconfig - applies the changes you have made for a server instance SYNOPSIS
reconfig --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--discard- manualchanges=false] [--keepmanualchanges=false] instance_name This command is deprecated. It allows you to apply changes you have made for a server instance. Use the reconfig command after you've used the set command to change server properties. Any changes you make to the configuration files of the server do not take affect until you apply the changes by running the reconfig command. When --discardmanualchanges is set to true, manual changes made to the server.xml file are discarded. When --keepmanualchanges is set to true, manual changes made to the server.xml file take affect. However if both options are false (both options are not specified), an error message is displayed if manual changes and/or changes have been applied using the Adminis- trator Interface. Use this command with discretion since there is no undo, and the changes applied are made directly to your con- fig/backup/server.xmlfile. OPTIONS
--user administrative user associated for the instance. --password administrative password corresponding to the administrative user. --host host name of the machine hosting the administrative instance. --port administrative port number associated with the administrative host. --passwordfile file containing passwords appropriate for the command (e.g., administrative instance). --secure if true, uses SSL/TLS to communicate with the administrative instance. --discardmanualchanges defaults to false. When set to true, discards the changes made manually to the server.xml file. --keepmanualchanges defaults to false. When set to true, allows the manual changes made to the server.xml file to take affect. OPERANDS
instance_name name of the instance.. Example 1: Using reconfig asadmin> reconfig --user admin --passwordfile passwords.txt --host localhost --port 4848 server1 Successfully reconfigured Example 2: Using reconfig with the --discardmanualchanges option asadmin> reconfig --user admin --passwordfile passwords.txt --host localhost --port 4848 --discardmanualchanges server1 Instance restart is required Successfully reconfigured Example 3: Using reconfig with the --keepmanualchanges option asadmin> reconfig --user admin --passwordfile passwords.txt --host localhost --port 4848 --keepmanualchanges server1 Instance restart is required Successfully reconfigured EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-get(1AS), asadmin-set(1AS), asadmin-list(1AS) J2EE 1.4 SDK March 2004 asadmin-reconfig(1AS)
All times are GMT -4. The time now is 09:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy