Sponsored Content
Top Forums UNIX for Advanced & Expert Users replace word with special charaters Post 302398105 by ungalnanban on Tuesday 23rd of February 2010 11:56:46 PM
Old 02-24-2010
MySQL

you want to change your log file content "\\" to some special character or any characters,
you can try this by using the following example code;

Code:
sed -e "s/[\]/-/g"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with awk while handling special charaters

Hi, I have an application.xml file like </dependency> <artifactId>_AdminServicesEAR</artifactId> <version>1.0.0-20080521.085352-1</version> <context-root>oldvalue</context-root> <type>ear</type> <DOCTYPE "abc/xyz/eft"> <NewTag>value123</xyz> ... (4 Replies)
Discussion started by: subin_bala
4 Replies

2. Shell Programming and Scripting

Replace a word after a particular word in a file

Hi, I want to replace a word in a file which occurs after a particular word. For example : $cat file.txt CASE WHEN AND c1 = 'I' AND c2= '2' THEN 1 WHEN AND c1= 'I' AND c2= '0' THEN 2 So in this example i want to replace... (4 Replies)
Discussion started by: ashwin3086
4 Replies

3. Shell Programming and Scripting

Replace a word in a string starting with another word

Hi All, I have a file in which a number of lines are starting with similar first word but different next words. I want to replace the any nth word(not 1st or 2nd) with another word. Eg:- My file contains are like this:- Ram is a boy. Ram is a good boy. Ram plays cricket. Here I want to... (2 Replies)
Discussion started by: mukeshbaranwal
2 Replies

4. Shell Programming and Scripting

Find and replace a word in all the files (that contain the word) under a directory

Hi Everyone, I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap". For Example: In the Directory, $pwd /home/nick $ grep -l "xsgd1234dap" *.sh | wc -l 119 I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies

5. Shell Programming and Scripting

Replace special characters

I have a line ending with special character and 0 The special character is the field separator for this line in VI mode the file will look like below, but while cat the special character wont display i know the hexa code for the special character ^_ is \x1f and ascii code is \0037, ... (0 Replies)
Discussion started by: ratheeshjulk
0 Replies

6. Shell Programming and Scripting

How to replace special characters?

Hi Unix Guru, I have an requirement for replace some specail characters in a file, my file came from mainframe. please see below example: when open it with vi 17896660|89059215|04/24/1998 00:00:00.000000| abc 123-453-1312^M<85>^M<85>|124557 if I run cat -v I got following:... (25 Replies)
Discussion started by: ken002
25 Replies

7. UNIX for Dummies Questions & Answers

Find and replace mulitple charaters in filenames

I have a virtual pdf printer set up on my server which produces files with the following prefix: smbprn_00000044_Microsoft_Word_-_OriginalFilename.pdfthe number in the center of the file increase by one for each new file. I want to remove all the charaters infront of OriginalFilename.pdf using... (14 Replies)
Discussion started by: barrydocks
14 Replies

8. Shell Programming and Scripting

Shell Script @ Find a key word and If the key word matches then replace next 7 lines only

Hi All, I have a XML file which is looks like as below. <<please see the attachment >> <?xml version="1.0" encoding="UTF-8"?> <esites> <esite> <name>XXX.com</name> <storeId>10001</storeId> <module> ... (4 Replies)
Discussion started by: Rajeev_hbk
4 Replies

9. Shell Programming and Scripting

How do i replace a word ending with "key" using awk excpet for one word?

echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} | awk 'gsub(/^|abc,|$/,"") {print}' Required output {grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies

10. UNIX for Advanced & Expert Users

How to replace special characters?

Hi Team, I have data like this. |*|.5|*|0.2|*|A.B|*| Would like to add zero (0) before the decimal point where there is no zero as |*|0.5|*|0.2|*|A.B|*| How to replace |*|. with |*|0. I tried below command which didn't work echo '|*|.5|*|0.2|*|A.B|*' | sed... (4 Replies)
Discussion started by: Ravi.K
4 Replies
iswalpha(3C)						   Standard C Library Functions 					      iswalpha(3C)

NAME
iswalpha, isenglish, isideogram, isnumber, isphonogram, isspecial, iswalnum, iswascii, iswblank, iswcntrl, iswdigit, iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit - wide-character code classification functions SYNOPSIS
#include <wchar.h> #include <wctype.h> int iswalpha(wint_t wc); int isenglish(wint_t wc); int isideogram(wint_t wc); int isnumber(wint_t wc); int isphonogram(wint_t wc); int isspecial(wint_t wc); int iswalnum(wint_t wc); int iswascii(wint_t wc); int iswblank(wint_t wc); int iswcntrl(wint_t wc); int iswdigit(wint_t wc); int iswgraph(wint_t wc); int iswlower(wint_t wc); int iswprint(wint_t wc); int iswpunct(wint_t wc); int iswspace(wint_t wc); int iswupper(wint_t wc); int iswxdigit(wint_t wc); DESCRIPTION
These functions test whether wc is a wide-character code representing a character of a particular class defined in the LC_CTYPE category of the current locale. In all cases, wc is a wint_t, the value of which must be a wide-character code corresponding to a valid character in the current locale or must equal the value of the macro WEOF. If the argument has any other values, the behavior is undefined. iswalpha(wc) Tests whether wc is a wide-character code representing a character of class "alpha" in the program's current locale. isenglish(wc) Tests whether wc is a wide-character code representing an English language character, excluding ASCII characters. isideogram(wc) Tests whether wc is a wide-character code representing an ideographic language character, excluding ASCII characters. isnumber(wc) Tests whether wc is a wide-character code representing digit [0-9], excluding ASCII characters. isphonogram(wc) Tests whether wc is a wide-character code representing a phonetic language character, excluding ASCII characters. isspecial(wc) Tests whether wc is a wide-character code representing a special language character, excluding ASCII characters. iswalnum(wc) Tests whether wc is a wide-character code representing a character of class "alpha" or "digit" in the program's current locale. iswascii(wc) Tests whether wc is a wide-character code representing an ASCII character. iswblank(wc) Tests whether wc is a wide-character code representing a character of class "blank" in the program's current locale. This function is not available to applications conforming to standards prior to SUSv3. See standards(5). iswlower(wc) Tests whether wc is a wide-character code representing a character of class "lower" in the program's current locale. iswcntrl(wc) Tests whether wc is a wide-character code representing a character of class "cntrl" in the program's current locale. iswdigit(wc) Tests whether wc is a wide-character code representing a character of class "digit" in the program's current locale. iswgraph(wc) Tests whether wc is a wide-character code representing a character of class "graph" in the program's current locale. iswprint(wc) Tests whether wc is a wide-character code representing a character of class "print" in the program's current locale. iswpunct(wc) Tests whether wc is a wide-character code representing a character of class "punct" in the program's current locale. iswspace(wc) Tests whether wc is a wide-character code representing a character of class "space" in the program's current locale. iswupper(wc) Tests whether wc is a wide-character code representing a character of class "upper" in the program's current locale. iswxdigit(wc) Tests whether wc is a wide-character code representing a character of class "xdigit" in the program's current locale. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ The iswalpha(), iswalnum(), iswblank(), iswcntrl(), iswdigit(), iswgraph(), iswlower(), iswprint(), iswpunct(), iswspace(), iswupper(), and iswxdigit() functions are Standard. SEE ALSO
localedef(1), setlocale(3C), stdio(3C), ascii(5), attributes(5), standards(5) SunOS 5.11 19 Apr 2004 iswalpha(3C)
All times are GMT -4. The time now is 07:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy