You can use POSIX character classes with tr
This converts all of the control characters (those ^M, etc) characters to a # in filename then writes the output to newfilename.
HI All
I need a shell script ehich removes all special characters from file and converts the file to UTF-* format
Specail characters to be removed must be configurable.
strIllegal = @"?/><,:;""'{|\\+=-)(*&^%$#@!~`";
Please help me in getting this script as my scripting skilla are... (2 Replies)
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)
Hi ,
I want to replace the special characters in the file.
For eg: cat abc
1234/4455/acb
234/k/lll/
234`fs`fd
I want to replace / and ` with the letter a and the output should like below. How to achieve this.
1234a4455aacb
234akallla
234afsafd (2 Replies)
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)
i need to replace the any special characters with escape characters like below.
test!=123-> test\!\=123
!@#$%^&*()-= to be replaced by
\!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
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)
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)
Hello Team,
Any help would be much appreciated for the below scenario:
I have a sed command below where I am trying to replace the contents of 'old_pkey' variable with 'new_pkey' variable in a Soap request file (delete_request.txt). This works fine for regular string values, but this new_pkey... (8 Replies)
Discussion started by: ChicagoBlues
8 Replies
LEARN ABOUT BSD
setquota
SETQUOTA(2) System Calls Manual SETQUOTA(2)NAME
setquota - enable/disable quotas on a file system
SYNOPSIS
setquota(special, file)
char *special, *file;
DESCRIPTION
Disc quotas are enabled or disabled with the setquota call. Special indicates a block special device on which a mounted file system
exists. If file is nonzero, it specifies a file in that file system from which to take the quotas. If file is 0, then quotas are disabled
on the file system. The quota file must exist; it is normally created with the quotacheck(8) program.
Only the super-user may turn quotas on or off.
SEE ALSO quota(2), quotacheck(8), quotaon(8)RETURN VALUE
A 0 return value indicates a successful call. A value of -1 is returned when an error occurs and errno is set to indicate the reason for
failure.
ERRORS
Setquota will fail when one of the following occurs:
[ENOTDIR] A component of either path prefix is not a directory.
[EINVAL] Either pathname contains a character with the high-order bit set.
[EINVAL] The kernel has not been compiled with the QUOTA option.
[ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters.
[ENODEV] Special does not exist.
[ENOENT] File does not exist.
[ELOOP] Too many symbolic links were encountered in translating either pathname.
[EPERM] The caller is not the super-user.
[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).
[EROFS] File resides on a read-only file system.
[EACCES] Search permission is denied for a component of either path prefix.
[EACCES] File resides on a file system different from special.
[EACCES] File is not a plain file.
[EIO] An I/O error occurred while reading from or writing to the file containing the quotas.
[EFAULT] Special or path points outside the process's allocated address space.
BUGS
The error codes are in a state of disarray; too many errors appear to the caller as one value.
4.2 Berkeley Distribution August 26, 1985 SETQUOTA(2)