Sponsored Content
Top Forums Shell Programming and Scripting Unable to grep control/non printable characters Post 302594815 by proactiveaditya on Wednesday 1st of February 2012 09:22:59 AM
Old 02-01-2012
Unable to grep control/non printable characters

Quote:
[root@server1 ~]# grep -r -w "reg.1.random" /test/ --include=x*.cfg
/test/test2/test3/x201.cfg:reg.1.random="^^^613*"
/test/x710.cfg:reg.1.random="a63BVTieQP5x"
/test/x201.cfg:reg.1.random="^^^613*"
/test/x240.cfg:reg.1.random="E20oCC4wgHbB"
/test/x205.cfg:reg.1.random="fG1jAXor43SM"
/test/x202.cfg:reg.1.random="h24cgSOqFP8K"
Unable to grep:
Quote:
[root@server1 ~]# grep -r -w "reg.1.random" /test/ --include=x*.cfg| grep '^^^613*'
Able to grep:
Quote:
[root@server1 ~]# grep -r -w "reg.1.random" /test/ --include=x*.cfg| grep 'h24cgSOqFP8K'
/test/x202.cfg:reg.1.random="h24cgSOqFP8K"

Last edited by proactiveaditya; 02-01-2012 at 10:28 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Best way to search files for non-printable characters?

I need to check ftp'd incoming files for characters that are not alphanumeric,<tab>, <cr>, or <lf> characters. Each file would have 10-20,000 line with up to 3,000 characters per line. Should I use awk, sed, or grep and what would the command look like to do such a search? Thanks much to anyone... (2 Replies)
Discussion started by: jvander
2 Replies

2. Shell Programming and Scripting

grep non printable characters

Sometimes obvious things... are not so obvious. I always thought that it was possible to grep non printable characters but not with my GNU grep (5.2.1) version. printf "Hello\tWorld" | grep -l '\t' printf "Hello\tWorld" | grep -l '\x09' printf "Hello\tWorld" | grep -l '\x{09}' None of them... (3 Replies)
Discussion started by: ripat
3 Replies

3. UNIX for Dummies Questions & Answers

delete non printable characters from file

i have a file which contains non printable characters like enter,escape etc i want to delete them from the file (2 Replies)
Discussion started by: alokjyotibal
2 Replies

4. HP-UX

Non-printable characters

I have been using OKI data Microline printers; models 590 and 591 to print a bar code using the following escape sequence: \E^PA^H^C00^D^C^A^A^A\E^PB^H The escape sequence is stored in a unix file which is edited using vi. Now, we are considering Microline printer model 395C and the bar code... (3 Replies)
Discussion started by: Joy Conner
3 Replies

5. Shell Programming and Scripting

Removing Non-printable characters in unix file

Hi, We have a non printable character "®" in our file , we want to remove this character, we tried tr -dc '' < oldfile> newfile but this command is removing all new line entries along with the non printable character and all the records are coming in one line(it is changing the format of the... (2 Replies)
Discussion started by: pyaranoid
2 Replies

6. 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

7. Shell Programming and Scripting

sed replacing specific characters and control characters by escaping

sed -e "s// /g" old.txt > new.txt While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies

8. Shell Programming and Scripting

Control Characters

Hallo Team, I am trying to get rid of the dollar sign. I managed to remove all the other special characters but i am struggling with this one. -bash-3.2$ cat -e missing_revenue_20141112.csv|less|head BW0522168531211141180935668@196.23.110.141$ BW092218784121114-370120610@196.23.110.141$... (4 Replies)
Discussion started by: kekanap
4 Replies

9. Shell Programming and Scripting

ksh check for non printable characters in a string

Hi All, I am trying to find non-printable characters in a string. The sting could have alphanumeric, puntuations and characters like (*&%$#.') but not non-printable (or that is what I think they are called) which are introduced when you copy any text from DOS to unix box. Input string1:... (10 Replies)
Discussion started by: dips_ag
10 Replies

10. Shell Programming and Scripting

Redirecting records with non-printable characters

Hi, I have a huge file (50 Mil rows) which has certain non-printable ASCII characters in it. I am cleaning the file by deleting those characters using the following command - tr -cd '\11\12\15\40-\176' < unclean_file > clean_file Please note that I am excluding the following - tab,... (6 Replies)
Discussion started by: rishigc
6 Replies
PY2DSC(1)							   User Commands							 PY2DSC(1)

NAME
py2dsc - creates Debian source package from Python package DESCRIPTION
usage: py2dsc [options] distfile or: py2dsc --help where distfile is a .zip or .tar.gz file built with the sdist command of distutils. OPTIONS
--dist-dir (-d) directory to put final built distributions in (default='deb_dist') --patch-already-applied (-a) patch was already applied (used when py2dsc calls sdist_dsc) --default-distribution deprecated (see --suite) --suite (-z) distribution name to use if not specified in .cfg (default='unstable') --default-maintainer deprecated (see --maintainer) --maintainer (-m) maintainer name and email to use if not specified in .cfg (default from setup.py) --extra-cfg-file (-x) additional .cfg file (in addition to stdeb.cfg if present) --patch-file (-p) patch file applied before setup.py called (incompatible with file specified in .cfg) --patch-level (-l) patch file applied before setup.py called (incompatible with file specified in .cfg) --patch-posix (-q) apply the patch with --posix mode --remove-expanded-source-dir (-r) remove the expanded source directory --ignore-install-requires (-i) ignore the requirements from requires.txt in the egg-info directory --pycentral-backwards-compatibility This option has no effect, is here for backwards compatibility, and may be removed someday. --workaround-548392 This option has no effect, is here for backwards compatibility, and may be removed someday. --force-buildsystem If True, pass '-- buildsystem=python_distutils' to dh sequencer --no-backwards-compatibility This option has no effect, is here for backwards compatibility, and may be removed someday. --guess-conflicts-provides-replaces If True, attempt to guess Conflicts/Provides/Replaces in debian/control based on apt-cache output. (Default=False). py2dsc 0.6.0+20100620 May 2011 PY2DSC(1)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy