To merge postscript files:
gs -sDEVICE=pswrite -sOutputFile=output.ps -dNOPAUSE -dBATCH file1.ps file2.ps file3.ps
To merge postscript files:
gs -sDEVICE=pswrite -sOutputFile=output.ps -dNOPAUSE -dBATCH file1.ps file2.ps file3.ps
here are my astyle options
astyle –convert-tabs –style=kr -p -s 4 file.cpp
Here are the options I use to check a file:
aspell check –mode=ccpp –run-together Std1200Intf.cpp
Here’s one liner to do a spell check on all the source files in the current directory:
find . -name ‘*.h’ -or -name ‘*.cpp’ | xargs -L 1 xterm -e aspell check –mode=ccpp –run-together
Script to add all the elements under the current directory to clearcase. The current directory must aleardy be under clearcase.
#!/usr/bin/bash
CLEARTOOL=”cleartool”echo Checking out current directory…
$CLEARTOOL co -nc .
echo
echo
echo
echo “******************************”
echo Adding all directories…
echo
for i in `find . -type d`; do
echo Adding $i …
$CLEARTOOL mkelem -nc $i
echo
doneecho
echo
echo
echo “******************************”
echo “Adding files ….”
echo
for i in `find . -type f`; do
echo “Adding $i …”
$CLEARTOOL mkelem -nc $i
$CLEARTOOL ci -nc $i
echo
doneecho
echo
echo
echo “******************************”
echo “Checking in directories…”
echo
for i in `find . -type d`; do
echo Checking in $i …
$CLEARTOOL ci -nc $i
echo
done
Create a C function to basically do the conversion from static to extern “C” for you:
extern “C” int CreateThread( pthread_t*& pThread, CVoidFunction pVoidFunction, void* pArgument )
{
// Create the thread
const int nResult = pthread_create( pThread,
(const pthread_attr_t*)0,
(void*(*)(void*))pVoidFunction, // cast to extern “C” void* (*)( void* )
pArgument );
return nResult;
}
gcc -E -Wp,-dD hello.c |grep \#define |sort
Here’s bash script that can be added to a compressed tar file to create a single image extractor/installer. To create the final image, simply create a compressed tar file and concatenate it with this script. Don’t forget to set the read and execute bits.
cat install_script.sh.in my_tar_image.tar.gz > install_script.sh
chmod a+r+x install_script.sh
Here is the script. Remove the gif extension. Make sure there is new line character after the %%%% delimiter:
The yum repositories for Fedora Core 8 (FC8) are installed via the fedora-release-8-5.noarch.rpm package. The package itself can be downloaded from any of the sites listed at http://mirrors.fedoraproject.org/publiclist.
For big endian machines (e.g. Motorola) :
typedef union{
struct{
uint32_t MSB :1;
.
.
.
uint32_t LSB :1;
}_bit;
uint32_t _word
} typename_t;
For little endian machines (e.g. Intel):
typedef union{
struct{
uint32_t LSB :1;
.
.
.
uint32_t MSB :1;
}_bit;
uint32_t _word
} typename_t;
Use prtdiag to get hardware information on Solaris.