Search Results

Search: Posts Made By: ongoto
1,602
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...
4,023
Posted By ongoto
Edit: Code removed: not working right.
Edit:
Code removed: not working right.
3,015
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"
...
1,405
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,015
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,872
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)
7,459
Posted By ongoto
ntfs is a windows file system. nothing wrong...
ntfs is a windows file system. nothing wrong with storing files to be shared, but linux scripts don't belong there. by the same token, windows *.exe files don't belong on a linux file system.
You...
3,117
Posted By ongoto
Will GAP number and RMS num ever be in the same...
Will GAP number and RMS num ever be in the same line?
or is the test to be for their one time occurance in the whole file?
2,516
Posted By ongoto
Can't explain why, but this works right. There...
Can't explain why, but this works right. There may be a shopt <option> to change the variable expansion rule??
set 1 2 4 11 "dogs mouse cars" 50 19 "noise toys"
3,015
Posted By ongoto
An attempt to stay close to your original...
An attempt to stay close to your original script...
#!/bin/sh

declare -A AGES # associative name/ages array
NAMES=($(cat names.data | sort -u)) # unique names array...
1,134
Posted By ongoto
An example in Bash...just ignores the ---------...
An example in Bash...just ignores the --------- field.
#!/bin/bash

file="./lineup.data"

while read fld1 fld2 fld3
do
if [[ ${fld1:0:1} == 's' ]]; then
printf "%-24s ,%s\n" " "...
12,227
Posted By ongoto
You could also try escaping back quotes.. ...
You could also try escaping back quotes..
counter=\`expr \$counter + 1\`
8,622
Posted By ongoto
A program which extracts the values you want to...
A program which extracts the values you want to see shouldn't be hard to do, but you will have to edit the parameters.txt file yourself and provide the values you want to see, and omit what you dont...
8,622
Posted By ongoto
Parameter Ideal Value Cell Name ...
Parameter Ideal Value Cell Name Actual Value
--------- ----------- --------- ------------
accmin Ranges RBR201A 100
cchpwr 33 ...
8,622
Posted By ongoto
Also for discussion, here's how...
Also for discussion, here's how CNAI_DUMP_RAW1.txt appears when loaded into Gnumeric. Each line extends to column EZL. I don't suppose it matters how many columns that is?...
Forum: Programming 01-04-2015
2,202
Posted By ongoto
That is possible. I can't remember all the type...
That is possible. I can't remember all the type checking details used in those days either. One way Bash (nowadays) distinguises between a variable named 'func' and a function named 'func()' is the...
Forum: Programming 01-04-2015
2,202
Posted By ongoto
Part of an if statement can be to call (fork) an...
Part of an if statement can be to call (fork) an external function; e.g. sed. You could say a == (the results of) sed /something/ for example. ccode is just the name of a variable. Judging by the...
Forum: Programming 12-31-2014
2,202
Posted By ongoto
I meant no offense. I'm just going along with...
I meant no offense.
I'm just going along with what you said. The questions you raised supports the fact that it doesn't make any sense, right?

if (exp()) is asking if the function exists; it's...
1,282
Posted By ongoto
If it's just about line numbering... nl -s ''...
If it's just about line numbering...
nl -s '' -w3 -nln file2 > file1
Forum: What is on Your Mind? 12-30-2014
1,660
Posted By ongoto
While Happy; do @ ;done < 2015
http://i62.tinypic.com/zt6a08.jpg
2,825
Posted By ongoto
Sorry. :p I don't know enough about screen or...
Sorry. :p
I don't know enough about screen or servers to help you there. I'm sure someone will come along who does.
2,825
Posted By ongoto
Screen is a pretty complex monster. There is a...
Screen is a pretty complex monster. There is a command to list sessions...
screen -ls
screen --listYou might be able to incorporate that output into your scripts.
See man screen
2,825
Posted By ongoto
RE: status If you are going to test Pidfile for...
RE: status
If you are going to test Pidfile for zero lines, if test `ps -e | grep -c $Pid` = 0; then... try > $Pidfile # instead of echo $! > $Pidfile when you 'stop' or initialize $Pidfile
1,857
Posted By ongoto
Another bash attempt... #!/bin/bash ...
Another bash attempt...
#!/bin/bash

hist=./hist
data=./abc.data
sort -k 2 -u $data -o $hist

while read a b
do
a=0
while read aa bb
do
if [[ "$bb" == $b ]]; then
...
Forum: Proxy Server 12-27-2014
12,597
Posted By ongoto
Check and see if the pc speaker is blacklisted. ...
Check and see if the pc speaker is blacklisted. I think it would be in /etc/modprobe.d/. Look for something like...
blacklist pcspkr
blacklist snd-pcsp
Showing results 1 to 25 of 48

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