Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to Remove Special Characters Post 302349753 by methyl on Tuesday 1st of September 2009 05:58:54 PM
Old 09-01-2009
I have a confession. I used the M$ Windows "calc" program to convert from hex to octal. We could of course have used unix "bc".

I've called the environment variable "X85" . It's just a name.

The special syntax to "echo" just allows you to generate any character from its octal representation. The "\c" at the end of the string stops "echo" adding a newline.

The translate program "tr" used in this way translates all occurances of one character to another character. Program "tr" and many others use "\n" to represent a newline.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

remove special and unicode characters

Hi, How do I remove the lines where special characters or Unicode characters appear? The following query does work but I wonder if there is a better way. cat test.txt | egrep -v '\)|#|,|&|-|\(|\\|\/|\.' The following lines show that my query is incomplete. Warning: The word "*Khan" is... (1 Reply)
Discussion started by: shantanuo
1 Replies

2. Shell Programming and Scripting

Remove special characters from string

Hi there, I'd like to write a script that removes any set of character from any string. The first argument would be the string, the second argument would be the characters to remove. For example: $ myscript "My name's Santiago. What's yours?" "atu" My nme's Snigo. Wh's yors? I wrote the... (11 Replies)
Discussion started by: chebarbudo
11 Replies

3. Shell Programming and Scripting

How to remove special characters from each line?

Hello, Is there a simpler way to remove special characters (color codes) from each lines in a log file? I use sed like in the example below but I think there should be a more simple way to achieve the same result: $ cat -vet file1 ^, , , , Maybe to convert the file somehow? ... (5 Replies)
Discussion started by: majormark
5 Replies

4. UNIX for Dummies Questions & Answers

Files with special characters - how to remove

Hi, I have a directory that has a file which contained special characters in the filename. Can someone please advise how to remove the file, preferably with a rm -i ? Thanks in advance. Listing is as below: {oracle}> ls -1b bplog.bkup.001 bplog.bkup.002 bplog.bkup.003 bplog.bkup.004... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. Shell Programming and Scripting

remove special characters

hello all I am writing a perl code and i wish to remove the special characters for text. I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command s/specialcharacters/null/g I really want to code like... (3 Replies)
Discussion started by: vasuarjula
3 Replies

6. Shell Programming and Scripting

Remove string between two special characters

Hi All, I have a variable like AVAIL="\ BACK:bkpstg:testdb3.iad.expertcity.com:backtest|\ #AUTH:authstg:testdb3.iad.expertcity.com:authiapd|\ TEST:authstg:testdb3.iad.expertcity.com:authiapd|\ " What I want to do here is that If a find # before any entry, remove the entire string... (5 Replies)
Discussion started by: engineermayur
5 Replies

7. Shell Programming and Scripting

Remove the special characters from field

Hi, In source data few of columns are having special charates(like *) due to this i am not able to display the data into flat file.it's displaying the some of junk data into the flat file. source dataExample: Address1="XDERFTG * HYJUYTG" how to remove the special charates in a string (2 Replies)
Discussion started by: koti_rama
2 Replies

8. Shell Programming and Scripting

Sed - remove special characters

Hi, I have a file with this line, it's always in the first line: I want to remove these special characters: ´╗┐ file1 ´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3 \\bar\c$\test\;35 Bytes;2 ;1 I want the same file to be only \\bar\c$\test2\;3.348.118 Bytes;160 ;3 \\bar\c$\test\;35... (4 Replies)
Discussion started by: nakaedu
4 Replies

9. Shell Programming and Scripting

How to remove some special characters in a string?

Hi, I have string like this ="Lookup Procedure" But i want the output like this Lookup Procedure =," should be removed. Please suggest me the solution. Regards, Madhuri (2 Replies)
Discussion started by: srimadhuri
2 Replies

10. Shell Programming and Scripting

How to remove special characters?

Hi Gurus, I have file which contains some unicode charachator like "ü". I want to replace it with some charactors. I searched in internet and got command sed "s/ü/-/g", but I don't know how to type ü in unix command line. Please help me for this one. Thanks in advance (7 Replies)
Discussion started by: ken6503
7 Replies
MOUNT(2)							System Calls Manual							  MOUNT(2)

NAME
mount, umount - mount or remove file system SYNOPSIS
mount(special, name, flags) char *special, *name; int flags; umount(special) char *special; DESCRIPTION
Mount announces to the system that a removable file system has been mounted on the block-structured special file special; from now on, ref- erences to file name will refer to the root file on the newly mounted file system. Special and name are pointers to null-terminated strings containing the appropriate path names. Name must exist already. Name must be a directory. Its old contents are inaccessible while the file system is mounted. The following flags may be specified to suppress default semantics which affect filesystem access. MNT_RDONLY The filesystem should be treated as read-only; Even the super-user may not write on it. MNT_NOEXEC Do not allow files to be executed from the filesystem. MNT_NOSUID Do not honor setuid or setgid bits on files when executing them. MNT_NODEV Do not interpret special files on the filesystem. MNT_SYNCHRONOUS All I/O to the filesystem should be done synchronously. Umount announces to the system that the special file is no longer to contain a removable file system. The associated file reverts to its ordinary interpretation. RETURN VALUE
Mount returns 0 if the action occurred, -1 if special is inaccessible or not an appropriate file, if name does not exist, if special is already mounted, if name is in use, or if there are already too many file systems mounted. Umount returns 0 if the action occurred; -1 if if the special file is inaccessible or does not have a mounted file system, or if there are active files in the mounted file system. ERRORS
Mount will fail when one of the following occurs: [ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. [ELOOP] Too many symbolic links were encountered in translating either pathname. [EPERM] The caller is not the super-user. [ENOENT] A component of name does not exist. [ENODEV] A component of special does not exist. [ENOTBLK] Special is not a block device. [ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware). [ENOTDIR] A component of name is not a directory, or a path prefix of special is not a directory. [EINVAL] Either pathname contains a character with the high-order bit set. [EINVAL] The super block for the file system had a bad magic number or an out of range block size. [EBUSY] Another process currently holds a reference to name, or special is already mounted. [EMFILE] No space remains in the mount table. [ENOMEM] Not enough memory was available to read the cylinder group information for the file system. [EIO] An I/O error occurred while reading the super block or cylinder group information. [EFAULT] Special or name points outside the process's allocated address space. Umount may fail with one of the following errors: [ENOTDIR] A component of the path prefix is not a directory. [EINVAL] The pathname contains a character with the high-order bit set. [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EPERM] The caller is not the super-user. [ENODEV] Special does not exist. [ENOTBLK] Special is not a block device. [ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware). [EINVAL] The requested device is not in the mount table. [EBUSY] A process is holding a reference to a file located on the file system. [EIO] An I/O error occurred while writing the super block or other cached file system information. [EFAULT] Special points outside the process's allocated address space. SEE ALSO
mount(8), umount(8) BUGS
Some of the error codes need translation to more obvious messages. Physically write-protected and magnetic tape file systems must be mounted read-only or errors will occur when access times are updated, whether or not any explicit write is attempted. MNT_SYNCHRONOUS is not currently implemented in the kernel but may be specified because the kernel ignores it. 4th Berkeley Distribution January 25, 1996 MOUNT(2)
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy