The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Email a File from UNIX which has Japanese characters in it jainkirti Shell Programming and Scripting 4 09-07-2009 08:22 AM
delete beginning field. daveisme Shell Programming and Scripting 2 08-28-2009 12:11 PM
delete zero byte file dsdev_123 Shell Programming and Scripting 2 04-29-2009 12:21 PM
Add new lines with a space in beginning Aejaz UNIX for Advanced & Expert Users 8 05-01-2008 12:21 PM
delete lines from file2 beginning w/file1 michieka Shell Programming and Scripting 13 06-24-2003 01:42 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #8 (permalink)  
Old 3 Days Ago
ubbeauty ubbeauty is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 4
Detect lines beginning with double-byte characters (Japanese) and delete [solved]

Thanks guys, that worked great! I ran "diff" and the outputs of both the awk and perl commands are identical for my working file.

I'm new at this - but I used the command like this:

awk 'substr($0,1,1) < "\200"' file1 > file2

Question: How to interpret the "\200"?
  #9 (permalink)  
Old 2 Days Ago
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,407
The string "\200" represents a single character with octal value 200, which in binary is 10000000, i.e. the most significant bit is set to 1.
So, the supplied awk code prints lines where the first character's most significant bit is not set.
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0