Sponsored Content
Top Forums Shell Programming and Scripting Cut wildcard characters from a string Post 302893191 by RavinderSingh13 on Monday 17th of March 2014 11:06:26 PM
Old 03-18-2014
Hello Raokl,

Not sure if this meets your requirement, could you please try the following.
This is to remove * and ?.

Code:
echo "test1.props,test2.props,*,test3.props,?,test4,props" | awk 'gsub(/\*/,X) gsub(/\?/,Y) 1'

Output will be as follows.

Code:
test1.props,test2.props,,test3.props,,test4,props


Thanks,
R. Singh
 

10 More Discussions You Might Find Interesting

1. AIX

CUT command - cutting characters from end of string

Hello, I need to delete the final few characters from a parameter leaving just the first few. However, the characters which need to remain will not always be a string of the same length. For instance, the parameter will be passed as BN_HSBC_NTRS/hub_mth_ifce.sf. I only need the bit before the... (2 Replies)
Discussion started by: JWilliams
2 Replies

2. Shell Programming and Scripting

how to cut string with wildcard (sed)

i got text file and contain.... SKYPE Dec 11 09:26:05 IN=eth0 OUT=eth1 SRC=75.38.161.80 DST=192.168.1.56 PROTO=UDP SPT=30645 DPT=12630 LEN=66 SKYPE Dec 11 09:26:05 IN=eth1 OUT=eth0 SRC=192.168.1.56 DST=118.109.39.86 PROTO=UDP SPT=12630 DPT=15889 LEN=75 SKYPE Dec 11 09:26:05 IN=eth1 OUT=eth0... (2 Replies)
Discussion started by: slackman
2 Replies

3. Solaris

Problem in using wildcard characters in xargs with find

Hi, Under my parent diectory I have directory named "Response" in many of its subfolders. I am interested to see all files with extention .pro in Response Directory. I am giving following command - find . -name "Response" -type d | xargs -i ls -lrt {}/*.pro but it is not giving result. ... (3 Replies)
Discussion started by: sanjay1979
3 Replies

4. Shell Programming and Scripting

use sed do batch wildcard string replace

Hi, Here is what I want to do I want to search local directory and its sub directory, all the files which contain any string like _12345, then remove this string. String is a combination of _ plus a random integer number. For example, here is one line in a file before <properties... (1 Reply)
Discussion started by: bp5000
1 Replies

5. Shell Programming and Scripting

Find replace a particular string of data with wildcard

Hi I am having a csv file in which lots of data are available wherein i need to find a particular kind of data and replace it with null value. here is the sample data.. I need to find the string starting with 404-064- and up to the first space i have to remove the data and keep the... (4 Replies)
Discussion started by: aemunathan
4 Replies

6. Shell Programming and Scripting

sed delete wildcard within a string

Hi I would like to batch delete the "note" entry from bib files. The start would be defined by "note ={" and the end by "}." (see example bib entry below). I tried the following command which does not have any effect: cat input.bib| sed -e 's/note = {.*}.//' > output.bib Any help would... (2 Replies)
Discussion started by: gerggeismann
2 Replies

7. Shell Programming and Scripting

sed cut characters of string

helloo I wonder if there's a way to cut characters out of a string and keep only the last 2 by using sed. For example if there's the todays' date: 2012-05-06 and we only want to keep the last 2 characters which are the day. Is there a quick way to do it with sed? (2 Replies)
Discussion started by: vlm
2 Replies

8. Shell Programming and Scripting

Help Needed! - Cut characters after a text string and append to end of filename

Hi all.. I have several unique files that contain one thing in common, and that is acct#. For all files in the directory, I want to append the 10 characters following the word "ACCOUNT:" to the end of the filename. for example: I have file 111_123 that contains ACCOUNT:ABC1234567 The file... (5 Replies)
Discussion started by: cinderella1
5 Replies

9. Shell Programming and Scripting

Cut a string for last 8 characters

Hello All I have a file like this abc.tpt.ctl bdc.tpt.ctl cdw.tpt.ctl I have looped every line using the for Loop, now I want to take each line and cut the .tpt.ctl part of it and store it in a variable and use the variable in same loop. The part I am stuck at is how do I cut the last... (9 Replies)
Discussion started by: nnani
9 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
ICU-CONFIG(1)							 ICU 50.1.2 Manual						     ICU-CONFIG(1)

NAME
icu-config - output ICU build options SYNOPSIS
icu-config [ --bindir ] [ --cc ] [ --cflags ] [ --cppflags ] [ --cppflags-searchpath ] [ --cxx ] [ --cxxflags ] [ --detect-prefix ] [ --exec-prefix ] [ --exists ] [ --help, -?, --usage ] [ --icudata ] [ --icudata-install-dir ] [ --icudata-mode ] [ --icudatadir ] [ --invoke ] [ --invoke=prog ] [ --ldflags ] [ --ldflags-layout ] [ --ldflags-libsonly ] [ --ldflags-searchpath ] [ --ldflags-system ] [ --ldflags-icuio ] [ --mandir ] [ --prefix ] [ --prefix=prefix ] [ --sbindir ] [ --shared-datadir ] [ --sysconfdir ] [ --unicode-version ] [ --version ] [ --incfile ] DESCRIPTION
icu-config simplifies the task of building and linking against ICU as compared to manually configuring user makefiles or equivalent. Because icu-config is an executable script, it also solves the problem of locating the ICU libraries and headers, by allowing the system PATH to locate it. EXAMPLES
icu-config can be used without a makefile. The command line below is sufficient for building a single-file c++ program against ICU. (For example, icu/source/samples/props/props.cpp) `icu-config --cxx --cxxflags --cppflags --ldflags` -o props props.cpp More commonly, icu-config will be called from within a makefile, and used to set up variables. The following example also builds the props example. CC=$(shell icu-config --cc) CXX=$(shell icu-config --cxx) CPPFLAGS=$(shell icu-config --cppflags) CXXFLAGS=$(shell icu-config --cxxflags) LDFLAGS =$(shell icu-config --ldflags) all: props props.o: props.cpp make(1) will automatically use the above variables. OPTIONS
--bindir Prints the binary (executable) directory path. Normally equivalent to 'bin'. ICU user-executable applications and scripts are found here. --cc Print the C compiler used. Equivalent to the $(CC) Makefile variable. --cflags Print the C compiler flags. Equivalent to the $(CFLAGS) Makefile variable. Does NOT include preprocessor directives such as include path or defined symbols. Examples include debugging (-g) and optimization flags --cppflags Print the C preprocessor flags. Equivalent to the $(CPPFLAGS) Makefile variable. Examples are -I include paths and -D define direc- tives. --cppflags-searchpath Print the C preprocessor flags, as above but only -I search paths. --cxx Print the C++ compiler. Equivalent to the $(CXX) Makefile variable. --cxxflags Print the C++ compiler flags. Equivalent to the $(CXXFLAGS) Makefile variable. --detect-prefix If ICU has been moved from its installed location, prepending this flag to other icu-config calls will attempt to locate ICU rela- tive to where the icu-config script has been located. Can be used as a last-chance effort if the ICU install has been damaged. --exec-prefix Print the prefix used for executable program directories (such as bin, sbin, etc). Normally the same as the prefix. --exists Script will return with a successful (0) status if ICU seems to be installed and located correctly, otherwise an error message and nonzero status will be displayed. --help, -?,--usage Print a help and usage message. --icudata Print the shortname of the ICU data file. This does not include any suffix such as .dat, .dll, .so, .lib, .a, etc nor does it include prefixes such as 'lib'. It may be in the form icudt21b --icudata-install-dir Print the directory where ICU packaged data should be installed. Can use as pkgdata(1)'s --install option. --icudata-mode Print the default ICU pkgdata mode, such as dll or common. Can use as pkgdata(1)'s --mode option. --icudatadir Print the path to packaged archive data. (should be where $ICU_DATA or equivalent default path points.) Will NOT point to the lib- dir. --invoke If ICU is not installed in a location where the operating system will locate its shared libraries, this option will print out com- mands so as to set the appropriate environment variables to load ICU's shared libraries. For example, on many systems a variable named LD_LIBRARY_PATH or equivalent must be set. --invoke=prog Same as the --invoke option, except includes options for invoking a program named prog. If prog is the name of an ICU tool, such as genrb(1), then icu-config will also include the full path to that tool. --ldflags Print any flags which should be passed to the linker. These may include -L for library search paths, and -l for including ICU libraries. By default, this option will attempt to link in the "common" (libicuuc) and "i18n" (libicui18n) libraries, as well as the data library. If additional libraries are required, any of the following two flags may be added in conjunction with this one, for example "--ldflags --ldflags-icuio" if the icuio library is required in addition to the standard ICU libraries. Equivalent to the $(LDFLAGS) Makefile variable. --ldflags-layout Prints the link option for the ICU layout library. --ldflags-icuio Prints the link option to add the ICU I/O package --ldflags-libsonly Similar to --ldflags but only includes the -l options. --ldflags-searchpath Similar to --ldflags but only includes the -L search path options. --ldflags-system Similar to --ldflags but only includes system libraries (such as pthreads) --mandir Prints the location of the installed ICU man pages. Normally (man) --prefix Prints the prefix (base directory) under which the installed ICU resides. --prefix=prefix Sets the ICU prefix to prefix for the remainder of this command line. Does test whether the new prefix is valid. --sbindir Prints the location of ICU system binaries, normally (sbin) --shared-datadir Prints the location of ICU shared data, normally (share) --sysconfdir Prints the location of ICU system configuration data, normally (etc) --unicode-version Prints the Version of the Unicode Standard which the current ICU uses. --version Prints the current version of ICU. --incfile Prints the 'Makefile.inc' path, suitable for use with pkgdata(1)'s -O option. AUTHORS
Steven Loomis VERSION
50.1.2 COPYRIGHT
Copyright (C) 2002-2004 IBM, Inc. and others. ICU MANPAGE
17 May 2004 ICU-CONFIG(1)
All times are GMT -4. The time now is 01:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy