Sponsored Content
Top Forums Shell Programming and Scripting Sed - substitution for whole string Post 77701 by Scarlos on Tuesday 12th of July 2005 07:56:54 AM
Old 07-12-2005
Thanks, it works just fine =D
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sed String Substitution

Hi! I've the following script code with an input parameter: sed 's/oldstring/$1/g' myfile > newfile (I launch it with comman line: $ MyShell newstring) Problem: the substituion doesn't work (oldstring becomes $1, instead of newstring). How could I solve this situation? Thanks, ... (2 Replies)
Discussion started by: pciatto
2 Replies

2. Shell Programming and Scripting

String Substitution Question

When I run the script I pass in 2 expressions (ex. replace.ksh new old) I want the script to go line by line for a given file in a given directory and replace the word new with old. Of course in my line where I have the awk statement it is replacing the 2nd word with 1st instead of new with... (3 Replies)
Discussion started by: goodrics
3 Replies

3. UNIX for Advanced & Expert Users

String Substitution

Hey ppl, Could u tell me how to replace such a string xyz->x with XYZ(x), where x can be any variable accessible by pointer to structure, xyz in an entire file? (1 Reply)
Discussion started by: laxmi
1 Replies

4. Shell Programming and Scripting

string substitution

Hey ppl, Could u tell me how to replace such a string xyz->x with XYZ(x), where x can be any variable accessible by pointer to structure, xyz in an entire file? (3 Replies)
Discussion started by: laxmi
3 Replies

5. Shell Programming and Scripting

String substitution

Hi, I have a properties file (myprop.properties) which contains some values: @oneValue@==tcp://localhost:1234 @twoValue@==tcp://localhost:4563 @threeValue@==tcp://localhost7895 I have a xml file (myXmlFile.xml)which contains some tokens: <application name="aTest"> <NameValuePair> ... (3 Replies)
Discussion started by: ctrl-alt-del
3 Replies

6. Shell Programming and Scripting

Problem with sed string substitution

Hi, heres my problem: echo "aaaa(aaaa(aaa" | sed 's/a.*(//g' gives aaa but it should give aaaa(aaa .*( should find any string to the appearance of (, but it finds any string to the last appearance, any idea why, and how to do this? and what if the string ist... (2 Replies)
Discussion started by: funksen
2 Replies

7. Shell Programming and Scripting

substitution of string in brackets

Hi friends! I have a tab delimited file with two columns : GB_45_DRB SP:0139466(mrmi sisignm)|SP:3674(fllflg_itoioh)|SP:68954779(RMTKLGF to emmdm-roomto) GB_45_DRD SP:475928(mgmdksi rikgkg)|SP:587959(roykgl tiic-tm)|SP:0139466(mrmi sisignm)|SP:3674(fllflg_itoioh)|SP:68954779(RMTKLGF to... (4 Replies)
Discussion started by: jacks
4 Replies

8. Shell Programming and Scripting

a specific string substitution

hi guys...need some help here... i am making a a script to automatically install netbackup client...so its gonna write a configuration file according to the host name.... the line would be something like this CLIENT_NAME = odel_bkp.test.com the thing is ...the host name in reallity is... (2 Replies)
Discussion started by: razael
2 Replies

9. Shell Programming and Scripting

string substitution in perl

Hi, I have a template file and want to replace 3 parameters to the values that I want. these values are in a parameter file. Any idea how to do this in perl? the parameter file looks like: host_name = jupiter PORT = 1562 IPADDRESS = 10.1.34.10 the template file has lots of entry.... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

10. Shell Programming and Scripting

sed - String substitution within specified section in ini type file

Hello. I am trying to modify a config file which is in windows *.ini type file. I have found a piece of code here :linux - Edit file in unix using SED - Stack Overflow As I can't make it doing the job , I am trying to find a solution step by step. here a modified sample file : my_sample.ini... (1 Reply)
Discussion started by: jcdole
1 Replies
condor_preen(1) 					      General Commands Manual						   condor_preen(1)

Name
       condor_preen remove - extraneous files from Condor directories

Synopsis
       condor_preen [-mail] [-remove] [-verbose]

Description
       condor_preenexamines  the  directories belonging to Condor, and removes extraneous files and directories which may be left over from Condor
       processes which terminated abnormally either due to internal errors or a system crash. The directories checked are the  LOG  ,	EXECUTE  ,
       and   SPOOL directories as defined in the Condor configuration files. condor_preenis intended to be run as user	root or user  condor peri-
       odically as a backup method to ensure reasonable file system cleanliness in the face of errors. This is done automatically  by  default	by
       the condor_masterdaemon. It may also be explicitly invoked on an as needed basis.

       When  condor_preencleans the  SPOOL directory, it always leaves behind the files specified in the configuration variable  VALID_SPOOL_FILES
       as given by the configuration. For the  LOG directory, the only files removed or reported are those listed within the  configuration  vari-
       able   INVALID_LOG_FILES  list. The reason for this difference is that, in general, the files in the  LOG directory ought to be left alone,
       with few exceptions. An example of exceptions are core files. As there are new log files introduced regularly, it is less effort to specify
       those that ought to be removed than those that are not to be removed.

Options
       -mail

	  Send mail to the user defined in the	PREEN_ADMIN configuration variable, instead of writing to the standard output.

       -remove

	  Remove the offending files and directories rather than reporting on them.

       -verbose

	  List all files found in the Condor directories, even those which are not considered extraneous.

Exit Status
       condor_preenwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.

Author
       Condor Team, University of Wisconsin-Madison

Copyright
       Copyright  (C)  1990-2012  Condor  Team,  Computer  Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
       Licensed under the Apache License, Version 2.0.

       See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu

								  September 2012						   condor_preen(1)
All times are GMT -4. The time now is 12:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy