Search Results

Search: Posts Made By: ongoto
2,738
Posted By ongoto
Hmmm.. Does it make any difference if you change...
Hmmm.. Does it make any difference if you change the quotes to slashes?
Maybe I should have kept quiet, because I don't know the differences between MS perl and linux perl?( if there are any ). ...
2,738
Posted By ongoto
Has anything like this been tried yet? ...
Has anything like this been tried yet?
2015-01-22 07:30:17,814000 +0900 [29133:main]/INFO:[configuration.manager/Cont'd_0030] - <ns2:logonTime hour="7" minute="45"/>
2015-01-22 07:30:17,814000...
1,589
Posted By ongoto
@acdc I played with your original code a little...
@acdc
I played with your original code a little and shamelessly stole the %COUNTS array from derekludwig. I came up with this without much regex...
#!/usr/local/bin/perl -w

use warnings;
use...
11,836
Posted By ongoto
No. I'm not opposing anyone. I'm just offering...
No. I'm not opposing anyone. I'm just offering some options because there is no ceiling command in the shell that I know of. I've found several kludge solutions using Dr. Google; nothing absolute...
11,836
Posted By ongoto
@ Don Cragun I was thinking of a general...
@ Don Cragun

I was thinking of a general solution to rounding, not strictly rounding up. My bad.

Setting precision to zero seems to do what the OP wants though. Have to wait and see.
11,836
Posted By ongoto
Hi Don Cragun I added to my previous post. I...
Hi Don Cragun
I added to my previous post.
I think it's a better way to go.
11,836
Posted By ongoto
Using awk. #!/bin/bash list=("$@") ...
Using awk.
#!/bin/bash

list=("$@")

for flt in ${list
};
do

echo $flt| awk '{print int($1+0.5)}'
done

# output
# ------
# $ ./rnd.sh 9.51 3.2 7.63 0.6 0.1
#
# 10
# 3
# 8
# 1
4,000
Posted By ongoto
Edit: Code removed: not working right.
Edit:
Code removed: not working right.
2,995
Posted By ongoto
A more complete example doesn't reduce the size...
A more complete example doesn't reduce the size of the script much. Sea and Chubler_XL have the best solutions as far as I can see.
Good luck.
2,995
Posted By ongoto
Nothing major. It looks like part of your code...
Nothing major.
It looks like part of your code (in red) is missing...read iname
[ $iname ] || output;
if [ $iname -gt $SIZE ] || [ $iname -lt 1 ]; then
echo "Choice is out of range"
...
Forum: Programming 01-13-2015
3,391
Posted By ongoto
There's more discussion on this here >>...
There's more discussion on this here >> (http://www.linuxquestions.org/questions/showthread.php?p=5300483#post5300483)
Storing a Temporary File Using C...
Forum: Programming 01-12-2015
1,194
Posted By ongoto
Without a sample data file to test this with it's...
Without a sample data file to test this with it's just a hard read.

Try starting a new if block after the else above, which ends the first if block:
} if ($LNUM==3) { #ERROR 1 # change elsif...
3,074
Posted By ongoto
OK. Then it's a cron issue. It's not about...
OK. Then it's a cron issue.
It's not about libwx_gtk2u_xrc-3.0.so belonging to gnuplot. It's a library shared by lots of applications like you said.
So I say again...help cron find the shared...
1,398
Posted By ongoto
This is a bit of a mess, but it works here. ...
This is a bit of a mess, but it works here. Might need some tweaking.
printf "Enter the two digits of your sum: "
## get cursor position
echo -en "\E[6n"
read -sdR posn
posn=${posn#*[}...
3,074
Posted By ongoto
OK. I see you are using tcsh. If you can...
OK. I see you are using tcsh.
If you can locate libwx_gtk2u_xrc-3.0.so.0 on your system (as Corona688 posted earlier), I was thinking you could add the path to that file in the PATH env variable,...
3,074
Posted By ongoto
In scripts I run with cron I add a line like...
In scripts I run with cron I add a line like this...
# Because cron doesn't run in your local environs
source $HOME/.bash_profile >&/dev/null

You could try something like -- export...
Forum: Programming 01-12-2015
3,746
Posted By ongoto
I hear ya. I had issues like that using Geany in...
I hear ya. I had issues like that using Geany in Linux. Might be the compiler. It compiles and runs well from a terminal though.
gcc tmp.c -o tmp
Forum: Fedora 01-12-2015
34,843
Posted By ongoto
The last time I looked at installing BSD, it had...
The last time I looked at installing BSD, it had to be installed on a primary partition. Is that still the case?

Unix is being kept around so people will appreciate Linux. :)
Forum: Programming 01-12-2015
3,746
Posted By ongoto
You are aware that this script only accepts...
You are aware that this script only accepts numbers as input, right?
Forum: Fedora 01-12-2015
34,843
Posted By ongoto
+1 I stay close to Redhat too (Centos6.6)...
+1
I stay close to Redhat too (Centos6.6) because I like a more 'old fashioned' Linux.
The big advantage with Debian based distros like Kali, Ubuntu, etc. is that they offer a huge software...
2,995
Posted By ongoto
You have to be careful not to enter a number that...
You have to be careful not to enter a number that is out of range. (zero or greater than the size of the list)

I made a few changes to catch that error and another bug I discovered...
function...
Forum: Programming 01-12-2015
2,858
Posted By ongoto
Will this work? total = 0 for c in '1.32',...
Will this work?
total = 0
for c in '1.32', '5.32', '4.4', '3.78':
c = float(c)
total += c
print totalIt might also work without c = float(c)
# c = float(c)
total += float(c)
Forum: Programming 01-11-2015
3,746
Posted By ongoto
Give this a try... #include <stdio.h> int...
Give this a try...
#include <stdio.h>

int main(void) {
int arr[10];
int i, x, len;
int flag = 0;

printf("Enter a word: ");

for (i = 0; i < 10; i++) {
...
Forum: Programming 01-11-2015
3,746
Posted By ongoto
You didn't say what's wrong? if...
You didn't say what's wrong?

if (arr[i] != arr[i + 1])
flag = 1;
}

if (flag == 0)
printf("The array has different elements.");Shouldn't this be if (flag...
7,430
Posted By ongoto
It's strange that Dolphin would freeze up like...
It's strange that Dolphin would freeze up like that. It's pretty robust.

Try as a normal user to launch Dolphin from a terminal. You should get a bunch of error messages. That might give you...
Showing results 1 to 25 of 166

 
All times are GMT -4. The time now is 06:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy