Sponsored Content
Top Forums UNIX for Advanced & Expert Users Need help to delete special characters exists only at the end of the each record in UNIX file? Post 303030144 by rakeshp on Wednesday 6th of February 2019 01:31:27 PM
Old 02-06-2019
Hi Don Cragun/RudiC/nezabudka/All,

As you suggested,Please see the sample data below replaced from actual data

Code:
XXXX99999999|x99999999999|999999999|X|X|99999999|99999999|X|99999999|99999999|99999999|9999999  999999|||X ^M
XXXX99999999|X99999999999|999999999|X|X|99999999|99999999|X|99999999|99999999|99999999|||X ^M
XXXX99999999|X99999999999|9999999999999|X|X|99999999|99999999|X|99999999|99999999|99999999||||X ^M
XXXX99999999|X99999999999|999999999|X|X|99999999|99999999|X|99999999|99999999|99999999||||X ^M
XXXX99999999|X9999999999999|999999999|X|X|99999999|99999999|X|99999999|99999999|99999999||||X ^M

Thanks
Rakesh Puli

Last edited by vgersh99; 02-06-2019 at 02:35 PM.. Reason: Code tags, please!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix file does not display special characters

We have a unix file that contains special characters (ie. Ñ, °, É, ¿ , £ , ø ). When I try to read this file I get a codepage error and the characters are replaced by the # symbol. How do I keep the special characters from being read? Thanks. Ryan (3 Replies)
Discussion started by: Ryan2786
3 Replies

2. UNIX for Dummies Questions & Answers

How to delete a file with special characters

I don't now exactly how I did it, but I created a file named " -C " cexdi:/home1 $ls -lt total 1801336 -rw------- 1 cexdi ced-group 922275840 23 mars 10:03 -C How do I delete this file ? cexdi:/home1 $rm -C rm: invalid option -- C Syntax : rm filename ... Doesn't work...... (5 Replies)
Discussion started by: yveslagace
5 Replies

3. UNIX for Dummies Questions & Answers

Advice on extracting special characters from a DB2 table to a file in the UNIX ENV

need some advice on the following situation. I have a DB2 table which has a varchar Column. This varchar column can have special characters like ©, ®, ™ . When I extract from this table to a sequential file for this varchar column I am only able to get © and ® . To Get the ™... (1 Reply)
Discussion started by: cosec
1 Replies

4. Shell Programming and Scripting

sed delete pattern with special characters

Hi all, I have the following lines <b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text) <b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text) <b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text) and I would like to... (5 Replies)
Discussion started by: stinkefisch
5 Replies

5. Shell Programming and Scripting

how to delete special characters from the file content

Hello Team, Any one suggest how to delte the below special character from a file which is having one column 10 rows of same below content. ---------------------------------------- Kosten|bersicht gemd_ ' =Welche Kosten kvnnen... (2 Replies)
Discussion started by: kanakaraju
2 Replies

6. Shell Programming and Scripting

Windows to UNIX FTP Special characters!

I have a file that has the name in one of the lines as MARíA MENDOZA in Windows. When this gets FTPed over to UNIX it appears as MAR�A MENDOZA. Is there anyway to overcome this? Its causing a issue because the file is Postional and fields are getting pushed by 2 digits.. Any help would be... (4 Replies)
Discussion started by: venky338
4 Replies

7. Shell Programming and Scripting

Need unix commands to delete records from one file if the same record present in another file...

Need unix commands to delete records from one file if the same record present in another file... just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file.. tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies

8. Shell Programming and Scripting

How to add trailer record at the end of the flat file in the unix ksh shell scripting?

Hi, How to add trailer record at the end of the flat file in the unix ksh shell scripting can you please let me know the procedure Regards Srikanth (3 Replies)
Discussion started by: srikanth_sagi
3 Replies

9. Shell Programming and Scripting

UNIX Special Characters

Any time I do : ls *.txt > mytext.txt I get something like this in the output file: ^ Tue Jan 22 16:19:19 EST 2013 x86_64 x86_64 x86_64 GNU/Linux t1Fam_BrOv :~>alias | grep ls alias l.='ls -d .* --color=tty' alias lR='ls -R' alias la='ls -Al' alias lc='ls -ltcr' alias ldd='ls -ltr |... (5 Replies)
Discussion started by: genehunter
5 Replies

10. Shell Programming and Scripting

Delete special characters

My sed is not working on deleting the entire special characters and leaving what is necessary.grep connections_per a|sed -e 's/\<\!\-\-//g' INPUT: <!-- <connections_per_instance>1</connections_per_instance> --> <method>HALF</method> <!--... (10 Replies)
Discussion started by: kenshinhimura
10 Replies
show(1m)																  show(1m)

NAME
show - Displays current information about the DTS entity SYNOPSIS
dtscp show attribute-group | attribute-name ARGUMENTS
The name of an attribute group or individual attribute to be displayed. The following values are valid: all all characteristics all coun- ters all status global servers local servers The name of a specific attribute from the characteristics, counters, or status group. The attribute specifiers global servers and local servers do not contain any other attributes. DESCRIPTION
The show command displays the names and values of the specified attributes or attribute groups. For attribute groups, if you do not supply a group name with the all argument, all characteristics and their values are displayed. The following sections list names of individual attributes, categorized by group. Note that the attributes displayed by the show command might be different, depending upon whether you have requested information about a server or a clerk. Characteristics Characteristic arguments can contain a maximum of 80 characters and are recalculated to a normalized date format. For example: Input value: 0-0025:10:99.99999999 Result: 1-01:11:39.990 Specifies whether a backup courier is currently functioning as a courier. If the role is noncourier, the node is not attempting to synchro- nize with global servers. This characteristic is shown only for servers. Default: noncourier Value: courier or noncourier Specifies whether automatic changes to the time differential factor are enabled or disabled; the value is determined by the operating sys- tem. Default: true Value: true/false Specifies the amount of time between checks for faulty servers. Applicable only to servers that have external time providers. This charac- teristic is shown only for servers. Default: 0-01:30:00.00 Value: 0-00:00:30.000 - 10675199-02:48:05.478 Specifies the rate at which the DTS server or clerk entity adjusts the node's clock during a synchronization. Specifies the amount of time between system clock ticks. The value is determined by the operating system. Specifies a server's interaction with the set of global servers. This characteristic is shown only for servers. The local server becomes a courier if none are available on the LAN. The local server synchronizes with the global set of servers. The local server does not syn- chronize with the global set of servers. Default: noncourier Specifies the DTS software version installed on the node. Specifies the server's epoch number. The change command modifies this characteristic. This characteristic is shown only for servers. Default: 0 Value: 0-255 Specifies the maximum separation allowed between the local clock and the computed time before synchronizations become abrupt rather than gradual (monotonic). Default: 0-00:10:00.000 Value: 0-00:00:00.500 - 10675199-02:48:05.478 Specifies the amount of time the node waits for a response to a WAN synchronization request before sending another request or declaring a global server to be unavailable. The number of attempts made to reach the server is controlled by the query attemps characteristic. Default: 0-00:00:15.000 Value: 0-00:00:00.000 - 0-00:10:00.000 Specifies the amount of time the node waits for a response to a synchronization request before sending another request or declaring a server to be unavailable. The number of attempts made to reach the server is controlled by the query attemps characteristic. Default: 0-00:00:05.000 Value: 0-00:00:00.000 - 0-00:10:00.000 Specifies the Time Differential Factor (TDF), which is the amount of time the server varies from Greenwich mean time (GMT) or Coordinated Universal Time (UTC). Default: 0-00:00:00.000 Value: -13-00:00:00 - 13-00:00:00 Specifies the worst-case drift rate of the node's clock, in nanoseconds per sec- ond, as determined by the manufacturer's specifications. Specifies the inaccuracy limit for the node. When the node exceeds the maximum inaccuracy setting, it attempts to synchronize. Default: 0-00:00:00.100 Value: 0-00:00:00.0 - 10675199-02:48:05.478 Specifies the future time at which the time differential factor is automatically changed. The value is determined by the operating system. Specifies the number of attempts that a node makes to contact a server before the node considers the server unavailable. Default: 3 Value: 1-10 Specifies a server's ACL entry name; <hostname> represents the name of the system or node that is the server's client. The default setting is the recommended value. This characteristic is shown only for servers. Default: /.:/hosts/<hostname>/dts-entity Specifies the security group name for the time servers within the cell. Default: /.:/subsys/dce/dts-servers Specifies a server's principal name for authentication purposes; <hostname> represents the name of the system or node that is the server's client. The default setting is the recommended value. This characteristic is shown only for servers. Default: /.:/hosts/<hostname>/self Specifies the minimum number of servers required for a synchronization. Settings of 1 or 2 may cause unreliable computed times. Default: 3 Value: 1-10 Specifies the interval a node must wait to synchronize. Also specifies synchronization frequency when a node reaches the value specified by the maximum inaccuracy characteristic. Clerks: Default: 0-00:10:00.0 Value: 0-00:00:30.0 - 01 00:00:00.00 Servers: Default: 0-00:02.00.0 Value: 0-00:00:30.0 - 01 00:00:00.00 Specifies whether or not the entity used an external time provider at the last successful synchronization. This attribute applies to servers only. Specifies the timestamp format used by the node. Specifies whether the node is a DTS server or clerk. The create command modifies this characteristic. Counters Specifies the number of times the node clock has been set nonmonotonically (abruptly). Specifies the time at which the DTS entity was created and the counters were initialized. Specifies the number of times the node received time response messages from servers or clerks that had epoch numbers different from its own. This counter is shown only for servers. Specifies the number of times the DTS has been disabled. Specifies the number of times the DTS has been enabled. Specifies the number of times the server's epoch has changed. Specifies the number of times the node has been unable to allocate virtual memory. Specifies the number of times that a local server was contacted, but it was not in the dts security group. Specifies the number of times the node's time interval failed to intersect with the computed interval of the servers. Specifies the number of times the courier server could not contact any global servers. This counter is shown only for servers. Specifies the number of times the local node failed to process a received message containing an incompatible protocol version. Specifies the number of times that a non-local server was contacted, but it was not in the dts security group. This counter is shown only for servers. Specifies the number of times the courier server could not contact a specific global server. This counter is shown only for servers. Specifies the number of times a server has detected faulty servers (other than itself). This counter is shown only for servers. Specifies the number of times the node successfully synchronized. Specifies the number of times a DTS operation detected a system error. Specifies the number of times the external time provider signaled a failure or the node was unable to access the time provider. Specifies the number of times a dtsd server process initiated contact with a time provider and did not receive the initial response within the interval specified by local set timeout (the default interval is 5 seconds). This counter is shown only for servers. Specifies the number of times the local node failed to process a received message containing an incompatible timestamp format. Specifies the number of times a node failed to synchronize because it could not contact the required minimum number of servers. Specifies the number of times a server has attempted to update its clock. This counter is shown only for servers. Status Specifies the current time on the node. Specifies the set of global servers known by the node. Specifies the computed time at the last attempted synchronization. Specifies the set of local servers known by the node. Specifies the state of the DTS entity. The DTS entity is disabled. The DTS entity is enabled. The DTS entity is synchronizing. The DTS entity is updating the time. Specifies the entity's unique identifier, which is generated when the entity is created. This attribute is shown only for servers. Privilege Required You must have read permission on the ACL associated with the DTS entity in order to execute the command. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLES
The following command shows how to display the current time: dtscp> show current time Current Time = 1990-11-30-12:11:41.718-05:00I0.359 EST The following command shows how to display all of the entity's characteristic attribute settings: dtscp> show all Check Interval = +0-01:30:00.000I----- Epoch Number = 0 Error Tolerance = +0-00:10:00.000I----- Local Time Differential Factor = -0-04:00:00.000I----- Maximum Inaccuracy = +0-00:00:00.100I----- Servers Required = 3 Query Attempts = 3 Local Set Timeout = +0-00:00:05.000I----- Global Set Timeout = +0-00:00:15.000I----- Synchronization Hold Down = +0-00:02:00.000I----- Type = Server Courier Role = NonCourier Acting Courier Role = NonCourier Clock Adjustment Rate = 40000000 nsec/sec Maximum Clock Drift Rate = 1000000 nsec/sec Clock Resolution = 10000000 nsec DTS Version = V1.0.1 Time Representation Version = V1.0.0 Time Provider Present = FALSE Automatic TDF Change = FALSE Next TDF Change = 1993-10-31-06:00:00.000+00:00I0.000 Server Principal Name = hosts/system1/self Server Entry Name = hosts/system1/dts-entity Server Group Name = sub- sys/dce/dts-servers The following command displays the current values of all characteristic attributes: dtscp> show all characteristics This command produces the same output as does the show all command. Check Interval = +0-01:30:00.000I----- Epoch Number = 0 Error Tolerance = +0-00:10:00.000I----- Local Time Differential Factor = -0-04:00:00.000I----- Maximum Inaccuracy = +0-00:00:00.100I----- Servers Required = 3 Query Attempts = 3 Local Set Timeout = +0-00:00:05.000I----- Global Set Timeout = +0-00:00:15.000I----- Synchronization Hold Down = +0-00:02:00.000I----- Type = Server Courier Role = NonCourier Acting Courier Role = NonCourier Clock Adjustment Rate = 40000000 nsec/sec Maximum Clock Drift Rate = 1000000 nsec/sec Clock Resolution = 10000000 nsec DTS Version = V1.0.1 Time Representation Version = V1.0.0 Time Provider Present = FALSE Automatic TDF Change = FALSE Next TDF Change = 1993-10-31-06:00:00.000+00:00I0.000 Server Principal Name = hosts/system1/self Server Entry Name = hosts/system1/dts-entity Server Group Name = sub- sys/dce/dts-servers The following command shows how to display all of the local servers known to the entity: dtscp> show local servers Known Servers ============================================================ Local /.../sisyphus.osf.org/hosts/system2/self Last Time Polled = 1993-10-15-21:01:46.124+00:00I0.809 Last Observed Time = 1993-10-15-21:03:09.041+00:00I----- Last Observed Skew = +0-00:01:22.917I----- Used in Last Synchronization = TRUE Transport Type = RPC Local /.../sisyphus.osf.org/hosts/system3/self Last Time Polled = 1993-10-15-21:01:46.124+00:00I0.809 Last Observed Time = 1993-10-15-21:01:46.143+00:00I0.817 Last Observed Skew = +0-00:00:00.019I1.625 Used in Last Synchronization = TRUE Transport Type = RPC The following command displays the current values of all counter attributes: dtscp> show all counters Creation Time = 1993-10-14-16:23:57.801+00:00I0.767 Local Times Not Intersecting = 0 Server Times Not Intersecting = 0 Different Epochs Detected = 0 Too Few Servers Detected = 0 Time Provider Timeouts Detected = 1 Protocol Mismatches Detected = 0 Time Representation Mismatches Detected = 0 No Global Servers Detected = 0 Servers Not Responding = 0 Clock Settings = 0 Epoch Changes Completed = 0 System Errors Detected = 0 Synchronizations Completed = 865 Updates Initiated = 0 Enable Directives Completed = 1 Disable Directives Completed = 0 Insufficient Resources Detected = 0 Time Provider Failures Detected = 0 Local server not in group = 0 Servers not in group = 0 The following command displays the current values of all status attributes: dtscp> show all status UID = 00004e34-5e1c-2c87-8500-08005a0d4582 Last Synchronization = 1993-10-15-21:05:43.023+00:00I----- State = On The following command displays the current value of the courier role attribute: dtscp> show courier role Courier Role = NonCourier The following command displays the server entry name for this server: dtscp> show server entry name Server Entry Name = hosts/system1/dts-entity The following command displays the current state of the Time Service entity: dtscp> show state State = On The following command displays the current value of the check interval attribute: dtscp> show check interval Check Interval = +0-01:30:00.000I----- The following command displays the current value of the servers times not intersecting counter: dtscp> show servers times not intersecting Server Times Not Intersecting = 0 RELATED INFORMATION
Commands: set(1m) show(1m)
All times are GMT -4. The time now is 01:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy