02-01-2011
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi I have following if condition
line_by_line="0000000000000tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt"
if
then
echo "Exclusion criteria"
else
echo "Not exclusion criteria"
fi
above condition works perfectley but if i add one more logical condition... (3 Replies)
Discussion started by: mahabunta
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to create an IF statement where if a variable is equal to at least one of 2 (or more) values then the script proceeds. For example:
TEST_VAR=2
if ; then
echo success!
else
echo failure
fi
I understand that the above syntax is wrong but I feel it must be close. Any... (1 Reply)
Discussion started by: msb65
1 Replies
3. Shell Programming and Scripting
I have a script that runs on multiple servers. What I want to do is have the script do the following:
if $(hostname) is equal to server or server2
then
TO_DIR=go
else
TO_DIR=stop
fi
I have tried:
if
if ]
Server is hpux.
any ideas? (1 Reply)
Discussion started by: cpolikowsky
1 Replies
4. UNIX for Dummies Questions & Answers
HI,
I have 5 variables var1, var2, var3, var4 and var5
I need to initialize all of them to zero.
Is there a way to do it in a single line
something like this
var1=var2=var3=var4=var5=0.
I am unable to achieve this.
What is going wrong? (2 Replies)
Discussion started by: paku
2 Replies
5. Shell Programming and Scripting
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`
if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_" -f4`
set bh_num_nm="$bh_nm $bh_ext a .txt"
mv $file_nm $bh_num_nm
}
... (3 Replies)
Discussion started by: jdsignature88
3 Replies
6. Shell Programming and Scripting
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
Discussion started by: Straitsfan
25 Replies
7. Shell Programming and Scripting
Hi guys,
I'm trying to send variable commands from 2 different files but I'm not figuring out how to put 2 "i" variables into the command, can anyone help?
This is what is done when I read only 1 file:
for i in $(file1.txt);do echo "$i "
I'm trying to echo 2 variables, matching the lines... (2 Replies)
Discussion started by: demmel
2 Replies
8. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
9. Shell Programming and Scripting
I wish to check two conditions inside the if statement
Condition 1: The two file contents should be identical // using cmp command for this.
Condition 2: The two filenames should NOT be the same.
This is what i did in vain.
if ]; then
where entry1 and entry2 are
ls *.txt | while... (7 Replies)
Discussion started by: mohtashims
7 Replies
10. UNIX for Beginners Questions & Answers
Hi ,
Can any please help the below requirement on all multiple servers and multiple dbs.
update configuration set value='yes' ;1)
the above statement apply on 31 Databases at a time on different Ip address
eg : 10.104.1.12 (unix ip address )
the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
LEARN ABOUT SUSE
fixup_datafile
fixup_datafile(3alleg4) Allegro manual fixup_datafile(3alleg4)
NAME
fixup_datafile - Fixes truecolor images in compiled datafiles. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void fixup_datafile(DATAFILE *data);
DESCRIPTION
If you are using compiled datafiles (produced by the dat2s and dat2c utilities) on a platform that doesn't support constructors (currently
any non GCC-based platform), or if the datafiles contain truecolor images, you must call this function once after your set the video mode
that you will be using. This will ensure the datafiles are properly initialised in the first case and convert the color values into the
appropriate format in the second case. It handles flipping between RGB and BGR formats, and converting between different color depths when-
ever that can be done without changing the size of the image (ie. changing 15<->16-bit hicolor for both bitmaps and RLE sprites, and
24<->32-bit truecolor for RLE sprites).
Note that you can only call this once and expect it to work correctly, because after the call the DATAFILE you fixed up is permanently con-
verted to whatever is the current component ordering for your screen mode. If you call fixup_datafile again, the function assumes you have
a freshly loaded datafile. It cannot "undo" the previous conversion.
If your program supports changing resolution and/or color depth during runtime, you have two choices: either call fixup_datafile() just
once and hope that the component ordering and bit depth doesn't change when the screen mode changes (unlikely). Or, you can reload your
datafiles when the screen mode changes.
SEE ALSO
set_gfx_mode(3alleg4), set_color_conversion(3alleg4)
Allegro version 4.4.2 fixup_datafile(3alleg4)