Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to get rid of all the weird characters and color on bash shell Post 85874 by akrathi on Friday 7th of October 2005 03:58:32 PM
Old 10-07-2005
you can apply this concept

#!/bin/bash
var=`tr -cds "[:alnum:]" "[ ]" <data`
echo $var
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

getting rid of control characters

how can i get rid of the control characters , ex. ^M, ^G, in a file? thanks... (2 Replies)
Discussion started by: apalex
2 Replies

2. UNIX and Linux Applications

get rid of special characters

Hi Friends, we have recently installed RHEL4.4 and when i give the commd ls -l > tt it prints the file name with some special charactes like ^[[00m1 in the begining of the file name and at the end of the file name. I wanted to use the file names of removing it before taking the backup and... (4 Replies)
Discussion started by: vakharia Mahesh
4 Replies

3. UNIX for Dummies Questions & Answers

Need help getting rid of bold characters

Hi! So i've got this shell script that asks questions and the user is required to input answers. The answers typed are bold. sh-*.*$ sh filename dir cat question tput bold read ans tput sgr0 ... and so on tput sgr0 exit So when the script ends i don't get the bold characters... (3 Replies)
Discussion started by: Kingzy
3 Replies

4. Shell Programming and Scripting

Getting rid of non-numeric and non-characters

I have a database script that always produces the following output: 0 btw, the unwanted character looks like a square on a unix system. it doesn't look like the above quote. how can I get rid of it and only keep the "0"? ---------- Post updated at 01:57 PM ---------- Previous update was... (2 Replies)
Discussion started by: SkySmart
2 Replies

5. Shell Programming and Scripting

get rid of non-alphanumeric characters

Hi! Could anyone so kindly help me a code to eliminate from a txt file, obtained by collecting and merge several web-page, every word (string) containing non alphabetical, numeric and punctuation character (i.e NON a-zA-Z0-9, underscore and punctuation mark)? Thanks a lot for the help to... (5 Replies)
Discussion started by: mjomba
5 Replies

6. UNIX for Dummies Questions & Answers

Any way to get rid of ^M characters in a text file using pr?

When I use vi to see what's in the file I get this: int add1(int x) {^M return x + 1;^M} ^Mint subtract1(int x) {^M return x - 1;^M} ^Mint double_it(int x) {^M return x * 2;^M} ^Mint halve_it(int x) {^Mreturn x / 2;^M} ^Mint main() {^M int myint;^M int result;^M ... (2 Replies)
Discussion started by: Nonito84
2 Replies

7. Shell Programming and Scripting

Getting rid of abnormal Characters

ok, so i have no clue why this script i wrote spits out these bizarre characters: i cant even copy and paste those characters on here because it just doesn't show up properly. my question is, using sed, how can i get rid of all characters that aren't normal? echo "abnormal characters" |... (4 Replies)
Discussion started by: SkySmart
4 Replies

8. Shell Programming and Scripting

share a shell script which can replace weird characters in directory or file name

I just finish the shell script . This shell can replace weird characters (such as #$%^@!'"...) in file or directory name by "_" I spent long time on replacing apostrophe in file/directory name added: 2012-03-14 the 124th line (/usr/bin/perl -i -e "s#\'#\\'#g" /tmp/rpdir_level$i.tmp) is... (5 Replies)
Discussion started by: begonia
5 Replies

9. UNIX for Dummies Questions & Answers

Getting rid of abnormal Characters

i'm grepping for words in the /var/adm/messages (sun solaris). but it looks like while my grepping finds the strings, when it outputs them out, the beginning of some lines are chopped off. Jun 13 14:06:02 sky.net ufs: NOTICE: alloc: /prod: file system full 3 14:39:19 sky.net ufs: NOTICE:... (1 Reply)
Discussion started by: SkySmart
1 Replies

10. Shell Programming and Scripting

sed to get rid of unwanted characters

so i have strings such as this: 'postfix/local#2,5#|CRON.*12062.*root.*CMD#2,5#|roice.*NQN1#1,2#|toysprc#1,4#' i need to get rid of the "#" and the numbers between them for each of the strings above. so the desired output should be: ... (1 Reply)
Discussion started by: SkySmart
1 Replies
cds(1m) 																   cds(1m)

NAME
cds - A dcecp object that represents a Cell Directory Service server SYNOPSIS
cds disable server_name cds help [operation | -verbose] cds operations cds show server_name ARGUMENTS
The name of the cds operation for which to display help information. The name of one CDS server running somewhere in the local cell. Specify the server name in one of the following formats: /.../cell_name/hosts/host_name/cds-server /.:/hosts/host_name/cds-server DESCRIPTION
The cds object allows some low-level control over a CDS server in the local cell. Using it, you can disable a running server, which causes it to shut down gracefully. This command will also display a limited set of the attribute and counter information currently known to the specified server. ATTRIBUTES
The number of times the server failed to update a child replica. The date-time stamp representing when the current server started. The number of crucial replicas known to the server. The skew time allowed the server. The list of clearinghouses known to the server. The number of read operations processed by the server since it started. The number of times the CDS server had problems with the cell Security Service. The number of skulks completed by the server since it started. The number of skulks initiated by the server since it started. The number of times the lookup path was broken during a server operation. The number of write operations processed by the server since it started. OPERATIONS
cds disable Disables the specified CDS server. The syntax is as follows: cds disable server_name The specified server must be running somewhere in the local cell, and you must have the privileges to access that machine. This operation returns an empty string on success. Privileges Required You must have dwc (delete, write, create) permissions on the namespace entry of the server. Example dcecp> cds disable /.:/hosts/blech/cds-server dcecp> cds help Returns help information about the cds object and its operations. The syntax is as follows: cds help [operation | -verbose] Options Displays information about the cds object. Used without an argument or option, the cds help command returns brief information about each cds operation. The optional operation argu- ment is the name of an operation about which you want detailed information. Alternatively, you can use the -verbose option to display detailed information about the cds object itself. Privileges Required No special privileges are needed to use the cds help command. Examples dcecp> cds help disable Disables the specified CDS server. show Returns attribute information about the named CDS server. help Prints a summary of command-line options. operations Returns a list of the valid operations for this command. dcecp> cds operations Returns a list of the operations supported by the cds object. The syntax is as follows: cds operations The list of available operations is in alphabetical order except for help and operations, which are listed last. Privileges Required No special privileges are needed to use the cds operations command. Examples dcecp> cds operations disable show help operations dcecp> cds show Returns attribute information about the specified CDS server. The syntax is as follows: cds show server_name The attributes returned mostly represent counter information, which can be used to help isolate a problems with a CDS server. The order in which the attributes are returned is fixed within CDS. Privileges Required You must have r (read) permissions on the namespace entry of the server. Examples dcecp> cds show /.:/hosts/blech/cds-server {Creation_Time 1995-10-11-10:06:31.434-04:00I-----} {Future_Skew_Time 0} {Read_Operations 141384} {Write_Operations 3589} {Skulks_Initiated 278} {Skulks_Completed 278} {Times_Lookup_Paths_Broken 0} {Crucial_Replicas 0} {Child_Update_Failures 0} {Security_Failures 0} {Known_Clearinghouses /.../gumby1/blech_ch} dcecp> RELATED INFORMATION
Commands: cdsd(1m), dcecp(1m), dcecp_cdsclient(1m). cds(1m)
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy