Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Magic numbers '&' operator problem Post 302536507 by segmentation on Tuesday 5th of July 2011 03:26:13 PM
Old 07-05-2011
Thank you very much friend it works now. "ubyte" is not writing on man pages but it is mentioned in somewhere in magic.mime database files and ulong, ubelong ... , as well. So "^" operator is vice versa of "&" we care about 0 bits, isn't it?


Aaa, I tested "^" operator for 0 bits this time but I have not idea about it.

In magic file, I inserted 0xd3 which is 11010011 in binary form
and in my file which I will test has 0xb1 on his first byte which is 10110001.
I operate ^ operator as "Or" and "exOr" but i could not get any idea.Could you help for this operator?

Last edited by segmentation; 07-05-2011 at 04:50 PM.. Reason: wrong guess
 

9 More Discussions You Might Find Interesting

1. Programming

Problem about c++ new operator

#include <iostream.h> class test { private: int i; public: inline test(int m) { i = m; } inline int get_i() { return i; } }; int main() { test * a = new test(2); (3 Replies)
Discussion started by: xbjxbj
3 Replies

2. Shell Programming and Scripting

multiple conditions in if using && operator

VARIABLE="project" if && ] then echo "VARIABLE is not empty" fi this is not working what is wrong in the syntax?? (2 Replies)
Discussion started by: codeman007
2 Replies

3. UNIX for Dummies Questions & Answers

Problem unary operator expected

I get the following error ./get_NE05: line 42: while do echo ${STRING_NAME} J=1 if ; then EXT=0$I else EXT=$I fi while do echo $I-$J #calculating last occurrence OCCURRENCE=`grep -io "${STRING_NAME}"... (3 Replies)
Discussion started by: f_o_555
3 Replies

4. UNIX for Dummies Questions & Answers

Solaris magic number problem

Hello, When I boot up my ancient SUNOS 5 system. it stops at the OK prompt and complains about a bad magic number. I have told that I need run fsck but I cannot seem to do so from the OK prompt. How can I get into a diagnostic mode so I can run fsck? Thanks, (1 Reply)
Discussion started by: mojoman
1 Replies

5. UNIX for Dummies Questions & Answers

problem with pipe operator

hi i am having issues with extra pipe. i have a data file and i need to remove the extra pipe in the(example 4th and 7thline) in datafile. there are many other line and filed like this which i need to remove from files. The sample data is below: 270 31|455004|24/03/2010|0001235|72 271... (3 Replies)
Discussion started by: abhi_n123
3 Replies

6. Shell Programming and Scripting

Alternative to && operator

"Both cases have to be true for the expression to evaluate "true". is that not so. the following code does a read from a txt file, an then suppose to do the deletion ,but although the condition exists, its not performing the deletion && echo "\n\t Deleting printer ${prt} !!!" if !... (5 Replies)
Discussion started by: ggoliath
5 Replies

7. Shell Programming and Scripting

How to write If statement using && and operator in Unix

Hi What is the syntax for if statement using && and || operator? if && ] || here its giving me an error to this if statement any suggestion?? (2 Replies)
Discussion started by: Avi
2 Replies

8. UNIX for Dummies Questions & Answers

Magic numbers string/B problem

Hello, In manpage magic(5) " The “B” flag compacts whitespace in the target, which must contain at least one whitespace character. If the magic has n consecutive blanks, the target needs at least n consecutive blanks to match. The “b” flag treats every blank in the target as an optional... (4 Replies)
Discussion started by: segmentation
4 Replies

9. Shell Programming and Scripting

Linux Platform - NDM Script - && Operator

Hi All, I have a requirement where i need to NDM 3 files from LINUX to Mainframe system & trigger a job in mainframe once the 3 files are transmitted successfully. I am getting an error message in the && operator (the code component where i am checking whether step 1/2/3 are completed). ... (2 Replies)
Discussion started by: dsfreddie
2 Replies
GLYPHS(5)							File Formats Manual							 GLYPHS(5)

NAME
glyphs - format of .glyphs files DESCRIPTION
Glyph files (``.glyph'' extension) are used to store commonly-used bit patterns (glyphs) for Magic. Right now, the bit patterns are used for two purposes in Magic. First, they specify patterns for programmable cursors: each cursor shape (e.g. the arrow used for the wiring tool) is read in as a glyph from a glyph file. Second, glyphs are used by the window manager to represent the icons displayed at the ends of scroll bars. Glyph file names normally have the extension .glyph. Glyph files are stored in ASCII format. Lines beginning with ``#'' are considered to be comments and are ignored. Blank lines are also ignored. The first non-comment line in a glyph file must have the syntax size nGlyphs width height The nGlyphs field must be a number giv- ing the total number of glyphs stored in the file. The width and height fields give the dimensions of each glyph in pixels. All glyphs in the same file must have the same size. The size line is followed by a description for each of the glyphs. Each glyph consists of height lines each containing 2xwidth characters. Each pair of characters corresponds to a bit position in the glyph, with the leftmost pair on the topmost line corresponding to the upper- left pixel in the glyph. The first character of each pair specifies the color to appear in that pixel. The color is represented as as a single character, which must be the short name of a display style in the current display style file. Some commonly-used characters are K for black, W for white, and . for the background color (when . is used in a cursor, it means that that pixel position is transparent: the underlying picture appears through the cursor). See ``Magic Maintainer's Manual #3: Display Styles, Color Maps, and Glyphs'' for more information. The second character of each pair is normally blank, except for one pixel per glyph which may contain a ``*'' in the second character. The ``*'' is used for programmable cursors to indicate the hot-spot: the pixel corresponding to the ``*'' is the one that the cursor is con- sidered to point to. For an example of a glyph file, see ~cad/lib/magic/sys/color.glyphs. SEE ALSO
magic(1), dstyle(5) 4th Berkeley Distribution GLYPHS(5)
All times are GMT -4. The time now is 05:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy