By more, vi, cat etc commands special characters (few control characters) are not identified.
Is there any way to find out those?
Thanks
Sumit (3 Replies)
Can I get some help on this please, I have looked at the many post with similar questions and have tried the solutions and they are not working for my scenario which is:
I have a text file (myfile) that contains
b_log=$g_log/FILENAME.log
echo "Begin processing file FILENAME " >> $b_log
... (4 Replies)
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,
I am stuck with a problem here.
Suppose i have a variable which is assigned some string containing special charatcers. for eg:
$a="abcdef^bbwk#kdbcd@";
I have to remove the special characters using Perl. The text is assigned to the variable implicitly.
How to do it? (1 Reply)
Hi All,
i am trying to remove all special charecters().,/\~!@#%^$*&^_- and others from a tab delimited file.
I am using the following code.
while read LINE
do
echo $LINE | tr -d '=;:`"<>,./?!@#$%^&(){}'|tr -d "-"|tr -d "'" | tr -d "_"
done < trial.txt > output.txt
Problem
... (10 Replies)
Well, I've searched the forum, but couldn't find an option, that would help me. I'm really a dummie in unix, so here it goes.
I've got like 50k files in a single catalogue. One of them contains a string:
Including the box/square brackets. I tried to find it manually, and use some search... (2 Replies)
Hi....I have a xml file which is having lots of special characters which I need to find out and put the distinct list of those into a text file. The list of special characters is not specific, it can be anything at different point of time.
Can anyone help me to find out the same and list out?
... (10 Replies)
Hi,
I have a "|" delimited file that is exported from a database.
There is one column in the file which has description/comments entered by some application user. It has "Control-M" character and "New Line" character in between the text.
Hence, when i export the data, this record with the new... (4 Replies)
Hi,
I need to create a test text file with the special characters \342\200\223 in it and to be able to use sed maybe to delete them
I tried doing it using vi by pressing CTRL-V and then typing 342 but it does not work. After pressing CTRL-V and typing 342 it seems to just insert the numbers... (1 Reply)
Discussion started by: newbie_01
1 Replies
LEARN ABOUT OPENSOLARIS
getent
getent(1M) System Administration Commands getent(1M)NAME
getent - get entries from administrative database
SYNOPSIS
getent database [key]...
DESCRIPTION
getent gets a list of entries from the administrative database specified by database. The information generally comes from one or more of
the sources that are specified for the database in /etc/nsswitch.conf.
database is the name of the database to be examined. This can be passwd, group, hosts, ipnodes, services, protocols, ethers, project, net-
works, or netmasks. For each of these databases, getent uses the appropriate library routines described in getpwnam(3C), getgrnam(3C),
gethostbyaddr(3NSL), gethostbyname(3NSL), getipnodebyaddr(3SOCKET), getipnodebyname(3SOCKET), getservbyname(3SOCKET), getprotoby-
name(3SOCKET), ethers(3SOCKET), getprojbyname(3PROJECT) and getnetbyname(3SOCKET), respectively.
Each key must be in a format appropriate for searching on the respective database. For example, it can be a username or numeric-uid for
passwd; hostname or IP address for hosts; or service, service/protocol, port, or port/proto for services.
getent prints out the database entries that match each of the supplied keys, one per line, in the format of the matching administrative
file: passwd(4), group(4), project(4), hosts(4), services(4), protocols(4), ethers(3SOCKET), networks(4), or netmasks(4). If no key is
given, all entries returned by the corresponding enumeration library routine, for example, getpwent() or gethostent(), are printed. Enumer-
ation is not supported on ipnodes.
Key Interpretation for passwd and group Databases
When getent is invoked with database set to passwd, each key value is processed as follows:
o If the key value consists only of numeric characters, getent assumes that the key value is a numeric user ID and searches the
user database for a matching user ID.
o If the user ID is not found in the user database or if the key value contains any non-numeric characters, getent assumes the key
value is a user name and searches the user database for a matching user name.
Similarly, when getent is invoked with database set to group, each key value is processed as follows:
o If the key value consists only of numeric characters, getent assumes that the key value is a numeric group ID and searches the
group database for a matching group ID.
o If the group ID is not found in the group database or if the key value contains any non-numeric characters, getent assumes the
key value is a group name and searches the group database for a matching group name.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 Command syntax was incorrect, an invalid option was used, or an internal error occurred.
2 At least one of the specified entry names was not found in the database.
3 There is no support for enumeration on this database.
FILES
/etc/nsswitch.conf name service switch configuration file
/etc/passwd password file
/etc/group group file
/etc/inet/hosts IPv4 and IPv6 host name database
/etc/services Internet services and aliases
/etc/project project file
/etc/protocols protocol name database
/etc/ethers Ethernet address to hostname database or domain
/etc/networks network name database
/etc/netmasks network mask database
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO ethers(3SOCKET), getgrnam(3C), gethostbyaddr(3NSL), gethostbyname(3NSL), gethostent(3NSL), getipnodebyaddr(3SOCKET), getipnodeby-
name(3SOCKET), getnetbyname(3SOCKET), getprojbyname(3PROJECT), getprotobyname(3SOCKET), getpwnam(3C), getservbyname(3SOCKET), group(4),
hosts(4), netmasks(4), networks(4), nsswitch.conf(4), passwd(4), project(4), protocols(4), services(4), attributes(5)SunOS 5.11 26 Mar 2007 getent(1M)