Sponsored Content
Top Forums Shell Programming and Scripting Sed replace characters not equal to an expression Post 302352240 by poldo on Thursday 10th of September 2009 10:27:36 PM
Old 09-10-2009
hey, thanks pludi. although i'm not that familiar with pearl. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to replace control characters using sed?

How can I use sed to replace a ctrl character such as 'new line' (\0a) to something else? Or any other good command can do this job? Thanks, Hillxy (5 Replies)
Discussion started by: hillxy
5 Replies

2. UNIX for Dummies Questions & Answers

replace words in sed using regular expression

hi, I need to replace all these lines from my text file 123end 234end 324end 234end 989end 258end 924end At the moment I know how to replace "end". But I want to replace the numbers before end as well. How can I do this ? sed s/end/newWord/ myfile.txt newFile.txt thanks (3 Replies)
Discussion started by: aneuryzma
3 Replies

3. Shell Programming and Scripting

Using sed to replace special characters

Hi everyone I have file1 contains: '7832' ' 8765 6543 I want a sed command that will format as: '7832' , '8765' , '6543' I tried sed -e s/\'//g -e 's/^*//;s/*$//' file1 > file2 sed -e :a -e '$!N; s/\n/ /; ta' file2 which gives: 7832 8765 6543 I need some help to continue with... (5 Replies)
Discussion started by: nimo
5 Replies

4. Shell Programming and Scripting

sed to replace the matching pattern with equal number of spaces

Hi I have written a shell script which used sed code below sed -i 's/'"$Pattern"'/ /g' $FileName I want to count the length of Pattern and replace it with equal number of spaces in the FileName. I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Discussion started by: rakeshkumar
8 Replies

5. Shell Programming and Scripting

Sed: -e expression #1, char 2: extra characters after command

Greetings.. getting the error while execution of the script, correct where i am missing #!/bin/bash DATE=`date +%Y-%m-%d:::%H:%M` HOSTNAME=`hostname` TXT="/log/temp.txt" LOGPATH="/log1/commanlogs/" IP=`/sbin/ifconfig | grep -i inet| head -n1| awk '{print $2}'| awk -F : '{print $2}'`... (7 Replies)
Discussion started by: manju98458
7 Replies

6. Shell Programming and Scripting

How does this sed expression to remove non-alpha characters work?

Hello! I know that this expression gets rid of non-alphanumeric characters: sed 's///g' and I understand that it is replacing them with nothing - hence the '//'-, but I don't understand how it's doing it. It seems it's finding strings that begin with alphanumeric and replacing them with... (2 Replies)
Discussion started by: bgnersoon2be#1
2 Replies

7. Shell Programming and Scripting

sed - How to replace right part of equal sign (=) on a line

Hello. Using a bash script , I have a variable name for the file I want to modify FILE_TO_EDIT="/etc/my_config_file"And I have a variable name for the parameter to change PARAMETER="fallback_node" PARAMETER_NEW_VALUE="http://my_server_name.com/new_path" A config file may contain : 1°)... (2 Replies)
Discussion started by: jcdole
2 Replies

8. Shell Programming and Scripting

Replace characters infile with sed

I have several files in a directory that look like this: jacket-n r potential-n - outcome-n f reputation-n b I want to replace the characters in the second column with certain numbers. For instance, I want the letters 'f', 'r' and 'b' in the second column to replaced with 0 and I want the... (1 Reply)
Discussion started by: owwow14
1 Replies

9. Shell Programming and Scripting

How to replace all but the first 3 characters with sed?

This seems like it should be an easy problem, but for some reason I am struggling with the solution. I simply want to replace all characters after the first 3 characters with another character, preferably with sed. Thanks in advance. Like this, but producing the proper number of *'s: sed... (30 Replies)
Discussion started by: leolson
30 Replies

10. Shell Programming and Scripting

sed replace characters using a wildcard

Hello, I have some data that looks like the following, > <SALTDATA> (OVS0199262) HCl > <IDNUMBER> (OVS0199262) OVS0199262 > <SUPPLIER> (OVS0199262) TimTec > <EMAIL> (OVS0199262) info@timtec.net > <WEBSITE> (OVS0199262) http://www.timtec.net I need to remove the data in... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
SoXtMaterialList(3IV)() 												   SoXtMaterialList(3IV)()

NAME
SoXtMaterialList -- component which lets you edit a material interactively INHERITS FROM
SoXtComponent > SoXtMaterialList SYNOPSIS
#include <Inventor/Xt/SoXtMaterialList.h> typedef void SoXtMaterialListCB(void *userData, const SoMaterial *mtl) Methods from class SoXtMaterialList: SoXtMaterialList(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, const char *dir = NULL) ~SoXtMaterialList() addCallback(SoXtMaterialListCB *f, void *userData = NULL) removeCallback(SoXtMaterialListCB *f, void *userData = NULL) Methods from class SoXtComponent: virtual void show() virtual void hide() SbBool isVisible() Widget getWidget() const SbBool isTopLevelShell() const Widget getShellWidget() const Widget getParentWidget() const void setSize(const SbVec2s &size) SbVec2s getSize() Display * getDisplay() void setTitle(const char *newTitle) const char * getTitle() const void setIconTitle(const char *newIconTitle) const char * getIconTitle() const void setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL) static SoXtComponent * getComponent(Widget w) const char * getWidgetName() const const char * getClassName() const DESCRIPTION
This class is used to choose an SoMaterial from palettes of predefined materials (for example, gold, silver, or bronze from the metal pal- ette; emerald, pearl, or ruby from the stones palette). The chosen material is passed to callback functions registered with this component. METHODS
SoXtMaterialList(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, const char *dir = NULL) ~SoXtMaterialList() The constructor is passed a directory name which serves as the home directory for the material palettes. You can have any number of pal- ettes in this directory. A palette is a subdirectory that contains Inventor data files, where each file describes one material. Prede- fined Inventor materials are found in /usr/share/data/materials. addCallback(SoXtMaterialListCB *f, void *userData = NULL) removeCallback(SoXtMaterialListCB *f, void *userData = NULL) Register functions that will be called whenever the user chooses a new material from the list. Each callback when invoked will be passed the userData pointer, along with a pointer to the newly selected material. SEE ALSO
SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor SoXtMaterialList(3IV)()
All times are GMT -4. The time now is 02:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy