10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello!
I'm making an English to Morse Code translator and I was able to mostly get it all working by looking through older posts here; however, I have one small problem.
When I run it it's just printing spaces for where the characters should be. It runs the right amount of times, and if I try... (3 Replies)
Discussion started by: arcoleman10
3 Replies
2. Shell Programming and Scripting
Hi All
I had requirement where I need to re-order columns in a file by using a control file.
here is the ctrl file
c1
c2
c3
source file
c3 | c1 | c2
a | b| c
I should create output file based on the ctrl file columns
o/p should look like this
c1 | c2 | c3
b| c|a
I wrote some... (9 Replies)
Discussion started by: gvkumar25
9 Replies
3. Programming
I have a class
and want to print values in MOD using
L = new Layer* ;
How can I print the values in MOD using this object L???
class Layer
{
public :
Model* MODP;
Model* MODS; (1 Reply)
Discussion started by: kristinu
1 Replies
4. Shell Programming and Scripting
Dear friends,
I want to print variables' values in certain format where space between two values of variables is "a tab"
I tried where I provided "tab" between two varibales.
But when it print values on screen its giving me output without spaces in two values.
Request you to help me in... (7 Replies)
Discussion started by: anushree.a
7 Replies
5. UNIX for Advanced & Expert Users
I have written a phyton script that accepts command line arguments. I am setting defaults for some of them if the user does not specify them. However I want to print the user values and the defaulted values seperately. However, once I set the default values, then I cannot use
if... (0 Replies)
Discussion started by: kristinu
0 Replies
6. UNIX for Advanced & Expert Users
Hi Guys,
here is a part of my source code. This part is reponsible to get the minimun of a few values:
..........
MAX=0.00
for a in `cat $OFILE`
do
if
then
... (2 Replies)
Discussion started by: Paat
2 Replies
7. Shell Programming and Scripting
Today I spent longer than I'd like to admit figuring out how to write a Bourne shell IF statement that tests a FLOAT value before executing a block of statements. Here's the solution I found, which invokes bc. Hope this will come in handy for someone:
value =
testval =
if
then
body... (5 Replies)
Discussion started by: sjepsen
5 Replies
8. Programming
Good morning,
I'm testing the use of ceilf:
/*Filename: str.c*/
#include <stdio.h>
#include <math.h>
int main (void)
{
float ceilf(float x);
int dev=3, result=0;
float tmp = 3.444f;
printf("Result: %f\n",ceilf(tmp));
return 0;
} (1 Reply)
Discussion started by: jonas.gabriel
1 Replies
9. UNIX for Dummies Questions & Answers
Hi
I know its a dumb question but can any one please explain me the difference of executing a shell script in the following 2 ways.
. script.sh
sh script.sh
I have a problem if I execute the following code as sh script.sh
DB_CNT_ALW=0.20
SCT_VAR=0.05
if ; then
echo "== Difference... (3 Replies)
Discussion started by: shash
3 Replies
10. Shell Programming and Scripting
I am trying to compare 2 float values using if
the foll code does not work
a=1.4
b=1.6
if test $a -gt $b
then
echo "$a is max"
else
echo "$b is max"
fi
does -gt work for floating point numbers, if not how do go about for my requirement? can i use bc ? pls help
thanks in advance... (2 Replies)
Discussion started by: kavitha
2 Replies