10-05-2018
Do you have a big Endian 32-bit integer you want to convert?
There are ways to do this, but they depend on what you are trying to do. I could guess, but to give you a good answer requires knowing what you are doing and what UNIX tools you have access to.
What UNIX: [answer here]
What Shell: [answer here]
What I am trying to do: [answer here]
Short answer -
you can write a C macro
You can use dd conv=swab to convert binary files
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have an expression using grep and nawk that captures the ID number of a given Unix process. It gets printed to screen but I don't know how to declare a variable to this returned value!
For example,
ps -ef|grep $project | grep -v grep | nawk '{print $2}'
This returns my number. How... (2 Replies)
Discussion started by: babariba
2 Replies
2. UNIX for Dummies Questions & Answers
... and there was absolutely nothing installed except fedora and ssh. I used yum to install vsftp and httpd, both start and ps shows they're running, and yet I can't connect with either of them. Where on earth or in redhat do I begin looking to unravel this one? I've overseen a server before but... (3 Replies)
Discussion started by: Bobby
3 Replies
3. Shell Programming and Scripting
Hi All,
I have written the below to add the numbers in a column. Postive numbers are unsigned and negative numbers are signed in the file. After the below cmd I am getting -0.00 , instead of 0.00. Can someone guide me on what I am missing in the cmd.
grep '^L' $FileName| awk -F"|" ' {... (7 Replies)
Discussion started by: gsjdrr
7 Replies
4. UNIX for Advanced & Expert Users
Hey folks,
not sure whether this or the security board is the right forum. If I failed, please move :)
So here's the problem:
I need to build a Linux environment in which only "signed" processes are allowed to run. When I say signed I don't mean a VeriSign signature like you know it from... (5 Replies)
Discussion started by: disaster
5 Replies
5. Programming
Hi guys, I want to add a list of SIGNED numbers... but I don't know how to tell the computer to ADD THEM as signed, let me explain further:
when adding 200 + (-100) , it becomes 100, but in asm the computer always add them as unsigned, so I always get the 300. Do I have to add them in a... (4 Replies)
Discussion started by: lamachejo
4 Replies
6. UNIX for Advanced & Expert Users
Why is my Live user signed into tty1 - 6?
A few details explaining the only changes I've made:
I downloaded Linux Mint 12. Burned, booted, and installed to hard drive. Performed updates. Downloaded Remastersys from repos. Remastered with updates (so I don't have to download them any... (3 Replies)
Discussion started by: bambuntu
3 Replies
7. Shell Programming and Scripting
hi,
how to I do this?
i="4.000"
if ; then
echo "smaller"
fi
how do I convert the "4.000" to 4?
Thanks! (4 Replies)
Discussion started by: h0ujun
4 Replies
8. Programming
when a date type is considered signed and unsigned is that simple referring to - for signed and positive numbers for unsigned? Further if that is the case would mutiplying and dividing ect where 2 signed numbers, like (-2)*(-2) = 4 result in a unsigned. (3 Replies)
Discussion started by: Fingerz
3 Replies
9. OS X (Apple)
Hi guys...
Macbook Pro, 13", circa August 2012, OSX 10.7.5, default bash terminal.
I require the capability to convert +32767 to -32768 into signed hex words...
The example piece code below works perfectly except...
#/bin/bash
# sign.sh
# Unsign to sign...
while true
do
# I have used... (2 Replies)
Discussion started by: wisecracker
2 Replies
10. Emergency UNIX and Linux Support
Hi,
I have an issue with openssl. Basically I have a ca certificate which has expired and I have regenerated a new ca.cert from the ca.key file and I have concatenated the output of the new ca.crt file and ca-bundle.crt to a new ca-bundle.crt.
Have restarted apache, however I still get the... (1 Reply)
Discussion started by: maverick_here
1 Replies
LEARN ABOUT DEBIAN
oggdec
oggdec(1) Vorbis Tools oggdec(1)
NAME
oggdec - simple decoder, Ogg Vorbis file to PCM audio file (Wave or RAW).
SYNOPSIS
oggdec [ -Qhv ] [ -b bits_per_sample ] [ -e endianness ] [ -R ] [ -s signedness ] [ -o outputfile ] file ...
DESCRIPTION
oggdec decodes Ogg Vorbis files into PCM-encoded ("uncompressed") audio files, either Wave or RAW format.
For each input file, oggdec writes to a filename based on the input filename, but with the extension changed to ".wav" or ".raw" as appro-
priate.
If the input file is specified as - , then oggdec will read from stdin, and write to stdout unless an output filename is specified. Like-
wise, an output filename of - will cause output to be to stdout.
Writing Wave format to stdout is a bad idea. Wave requires a seekable medium for the header to be rewritten after all the data is written
out; stdout is not seekable.
OPTIONS
-Q, --quiet
Suppresses program output.
-h, --help
Print help message.
-V, --version
Display version information.
-b n, --bits=n
Bits per sample. Valid values are 8 or 16.
-e n, --endian=n
Set endianness for 16-bit output. 0 (default) is little-endian (Intel byte order). 1 is big-endian (sane byte order).
-R, --raw
Output in raw format. If not specified, writes Wave file (RIFF headers).
-s n, --sign=n
Set signedness for output. 0 for unsigned, 1 (default) for signed.
-o filename, --output=filename
Write output to specified filename. This option is only valid if one input [file] is specified, or if raw mode is used.
EXAMPLES
Decode a file enabler.ogg to enabler.wav
as little-endian unsigned 16-bit (default options):
oggdec enabler.ogg
Decode a file enabler.ogg to enabler.raw as headerless little-endian unsigned 16-bit:
oggdec --raw=1 enabler.ogg
Decode enabler.ogg to enabler.crazymonkey as unsigned 8-bit:
oggdec -b 8 -s 0 -o enabler.crazymonkey enabler.ogg
Decode enabler.ogg to enabler.raw as big-endian signed 16-bit (any of the following):
oggdec -R -e 1 -b 16 enabler.ogg
oggdec -R -e 1 -b 16 -o enabler.raw - < enabler.ogg
oggdec -R -e 1 -b 16 - < enabler.ogg > enabler.raw
Mass decoding (foo.ogg to foo.wav, bar.ogg to bar.wav, quux.ogg to quux.wav, etc.):
oggdec *.ogg
AUTHORS
Program Authors
Michael Smith <msmith@xiph.org>
Manpage Authors
Frederick Lee <phaethon@linux.ucla.edu>, assisted by a few million monkeys armed with keyboards in irc://irc.openprojects.net/#vorbis
SEE ALSO
ogg123(1), oggenc(1), vorbiscomment(1), flac(1), speexdec(1)
Xiph.Org Foundation 2008 September 9 oggdec(1)