Sponsored Content
Full Discussion: smart question
Top Forums UNIX for Advanced & Expert Users smart question Post 76796 by zylwyz on Thursday 30th of June 2005 02:58:06 PM
Old 06-30-2005
Question smart question

eg. : there is a file - 322 bytes,
how can I (or you) view just a half of file (161 bytes)?
 

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Real smart question

hello My question is whats the difference between LP and LPR to print Sun Solaris ? lp -dprintername postscriptfile.ps or lpr -Pprintname postscriptfile.ps (2 Replies)
Discussion started by: Peterh
2 Replies

2. Shell Programming and Scripting

smart script?

First, I know that's a bad title. I couldn't think of anything short enough. ... I wrote the following script to let me know when various parts of the network are down. It used to look like this before last weekend when I got over 500 emails about 1 host being down all weekend: this is in the... (1 Reply)
Discussion started by: raidzero
1 Replies

3. UNIX for Dummies Questions & Answers

Explain the difference between the commands cd ~smart and cd ~/smart

Is it possible for both commands to work? (1 Reply)
Discussion started by: phunkypants
1 Replies

4. Shell Programming and Scripting

Need smart script !

Hi, I need a script to assign variables the below paths /appl/user_projects/domains/<xxx>/servers/<yyy>/logs Where <xxx> can be any number and name of directories. <yyy> can be another set of any number of names and directories. I want to neglect all the <xxx> and <yyy>... (3 Replies)
Discussion started by: mohtashims
3 Replies
bytes(3pm)						 Perl Programmers Reference Guide						bytes(3pm)

NAME
bytes - Perl pragma to force byte semantics rather than character semantics SYNOPSIS
use bytes; no bytes; DESCRIPTION
The "use bytes" pragma disables character semantics for the rest of the lexical scope in which it appears. "no bytes" can be used to reverse the effect of "use bytes" within the current lexical scope. Perl normally assumes character semantics in the presence of character data (i.e. data that has come from a source that has been marked as being of a particular character encoding). When "use bytes" is in effect, the encoding is temporarily ignored, and each string is treated as a series of bytes. As an example, when Perl sees "$x = chr(400)", it encodes the character in UTF-8 and stores it in $x. Then it is marked as character data, so, for instance, "length $x" returns 1. However, in the scope of the "bytes" pragma, $x is treated as a series of bytes - the bytes that make up the UTF8 encoding - and "length $x" returns 2: $x = chr(400); print "Length is ", length $x, " "; # "Length is 1" printf "Contents are %vd ", $x; # "Contents are 400" { use bytes; print "Length is ", length $x, " "; # "Length is 2" printf "Contents are %vd ", $x; # "Contents are 198.144" } For more on the implications and differences between character semantics and byte semantics, see perlunicode. SEE ALSO
perlunicode, utf8 perl v5.8.0 2002-06-01 bytes(3pm)
All times are GMT -4. The time now is 11:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy