Sponsored Content
Operating Systems HP-UX Removing ^D and ^H characters Post 302208873 by arsheshadri on Wednesday 25th of June 2008 07:03:07 AM
Old 06-25-2008
Removing ^D and ^H characters

Hi,

I have a very huge file and it contains some unprintable characters like ^H and ^D.

If I try to remove using cat test1.ser| tr -d '\136 110'>newfile1 it is only removing ^and all spaces in the file.

How can I remove these characters (^D ^H) and keep my spaces as it is?

Thanks & Regards
Shesha
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with removing characters like ^M

I have few files in unix which are in dos format. While I am copying these files, ^M, ^@, etc characters are being generated. I tried dos2unix command in Linux and it doesn't work. I tried sed to remove these characters but they won't go. I came to about this 'tr' command and tried to use it... (16 Replies)
Discussion started by: chiru_h
16 Replies

2. Shell Programming and Scripting

Removing certain characters in a file

Hi I have a file that has semicolons in it (;) is there a way to just remove these in the file. Example name: Joe Smith; group: Group1; name: Mary White; group: Group2; (2 Replies)
Discussion started by: bombcan
2 Replies

3. UNIX for Dummies Questions & Answers

removing characters

Hi all, Any help on how to do the following? :eek: I have an infile as follows: _thisishowyouwritehelloworld _thisisalsohowyouwritehelloworld2 I want to delete the characters from "_" to "how" and be left with: youwritehelloworld youwritehelloworld2 I am able to do delete from a... (2 Replies)
Discussion started by: dr_sabz
2 Replies

4. UNIX for Advanced & Expert Users

Removing ^M characters

hi I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed. Please help as how to get rid of these. This conv.pl is going to get schduled... (0 Replies)
Discussion started by: infyanurag
0 Replies

5. UNIX for Dummies Questions & Answers

Removing ^M characters

hi I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed. Please help as how to get rid of these. This conv.pl is going to get schduled... (5 Replies)
Discussion started by: infyanurag
5 Replies

6. Shell Programming and Scripting

Removing special characters

Dear Friends, I want to remove text between two patters. Problem is, it has random special characters like \ / | * ` ~ ! $ etc. These random special characters has no fixed length. But these special characters are appearing between a fixed pattern e.g. DM&^%#|#!\/?CT Expected output... (14 Replies)
Discussion started by: anushree.a
14 Replies

7. UNIX for Dummies Questions & Answers

removing non printable characters

Hi, in a file, i have records as below: 123|62|absnb|267629 123|267|28728|uiuip 123|567|26761|2676 i want to remove the non printable characters after the end of each record. I guess there are certain charcters but not visible. i don't know what character that is exactly. I used... (2 Replies)
Discussion started by: pandeesh
2 Replies

8. UNIX for Dummies Questions & Answers

Removing trailing characters

I have been given a shell script that I need to amend. To do the following extract the filename from the flag file by removing the .flag extension. # Local variables # Find if the flag files exists MASK=coda_mil2*.flag # Are there any files? bookmark="40" fileFound=0 ls -1... (3 Replies)
Discussion started by: andymay
3 Replies

9. Shell Programming and Scripting

Removing last and first characters in a file

bash-3.00$ cat temp.txt ./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/ces.war/WEB-INF/classes/reds/common/environment.properties ./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/commonproperties/hi/HostIntegration.properties... (9 Replies)
Discussion started by: bhas85
9 Replies

10. Shell Programming and Scripting

Removing all characters up to initial '{'

Hi there, Im having a bit of difficulty with this one and I suspect its because of the character I want to match against maybe causing me a problem, but i wanted to remove everything up to (but not including) the first instance of '{' in a string so for example the string that I want to... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
STRINGS(1)						    BSD General Commands Manual 						STRINGS(1)

NAME
strings -- print the strings of printable characters in files SYNOPSIS
strings [-a | --all] [-e encoding | --encoding=encoding] [-f | --print-file-name] [-h | --help] [-n number | --bytes=number | -number] [-o] [-t radix | --radix=radix] [-v | --version] [file ...] DESCRIPTION
For each file specified, the strings utility prints contiguous sequences of printable characters that are at least n characters long and are followed by an unprintable character. The default value of n is 4. By default, the strings utility only scans the initialized and loaded sections of ELF objects; for other file types, the entire file is scanned. The strings utility is mainly used for determining the contents of non-text files. If no file name is specified as an argument, standard input is read. The following options are available: -a | --all For ELF objects, scan the entire file for printable strings. -e encoding | --encoding=encoding Select the character encoding to be used while searching for strings. Valid values for argument encoding are: s for single 7-bit-byte characters (ASCII, ISO 8859). S for single 8-bit-byte characters. l for 16-bit little-endian. b for 16-bit big-endian. L for 32-bit little-endian. B for 32-bit big-endian. The default is to assume that characters are encoded using a single 7-bit byte. -f | --print-file-name Print the name of the file before each string. -h | --help Print a usage summary and exit. -n number | --bytes=number | -number Print the contiguous character sequence of at least number characters long, instead of the default of 4 characters. -o Equivalent to specifying -t o. -t radix | --radix=radix Print the offset from the start of the file before each string using the specified radix. Valid values for argument radix are: d for decimal o for octal x for hexadecimal -v | --version Display a version identifier and exit. EXIT STATUS
The strings utility exits 0 on success, and >0 if an error occurs. EXAMPLES
To display strings in /bin/ls use: $ strings /bin/ls To display strings in all sections of /bin/ln use: $ strings -a /bin/ln To display strings in all sections of /bin/cat prefixed with the filename and the offset within the file use: $ strings -a -f -t x /bin/cat SEE ALSO
ar(1), nm(1), objdump(1), ranlib, readelf(1), size(1) HISTORY
The first FreeBSD strings utility appeared in FreeBSD v3. It was later discontinued in FreeBSD v5, when i386-only a.out format was dropped in favor of ELF. AUTHORS
The strings utility was re-written by S.Sam Arun Raj <samarunraj@gmail.com>. This manual page was written by S.Sam Arun Raj <samarunraj@gmail.com>. BSD
December 19, 2011 BSD
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy