Sponsored Content
Top Forums Shell Programming and Scripting Find the lights which are turn on. Post 302434070 by rdcwayx on Thursday 1st of July 2010 08:38:57 AM
Old 07-01-2010
I don't know the answer, but it is interesting, your results are some regular numbers, all of them are square numbers.

When I run your code in my system, I don't get any output. Try to understand your idea first.
 

9 More Discussions You Might Find Interesting

1. SuSE

RH8.0 firewall WILL NOT turn off

I have been trying to disable the firewall on a new install of RH8(Psyche). It will NOT stay disabled. I've gone thru system tools, security level and disabled it, and it says YES, like it will save my settings, but when i open it up again, it is always back to HIGH. I also tried using the... (3 Replies)
Discussion started by: kymberm
3 Replies

2. UNIX for Dummies Questions & Answers

How to turn off duplex

I am using digital Unix and lpd. I have HP 4200n LaserJet TCP printer, but when I use lpr command, it always print duplex. I can turn off duplex feature at the panel of the printer, but then other Windows computer cannot print duplex. How can I set up /etc/printcap file so that it will be... (2 Replies)
Discussion started by: hiepng
2 Replies

3. SuSE

Amber Lights + Remote Servers

Ok, so we get reports from operations after they do walk throughs about servers with amber or red lights showing. They want us to resolve the issues. On Solaris I can run prtdiag to identify the amber lights and clear them (replace hardware or "reboot" the daemon). How do I remotely figure out... (1 Reply)
Discussion started by: BOFH
1 Replies

4. UNIX for Dummies Questions & Answers

turn off sound

how to disable anoying beep sound??? (4 Replies)
Discussion started by: nnn
4 Replies

5. Shell Programming and Scripting

Turn Off the Message [YOU HAVE NEW MAIL]

#!/bin/sh cd /u02/app/ccalloc/dev/in CURDIR=`pwd` echo directory listing of $CURDIR echo ls -latr i have a basic shell script that displays a specific files on a directory. when the script is run and it does not find the file in the directory it display a first line message of how... (3 Replies)
Discussion started by: wtolentino
3 Replies

6. Red Hat

Turn off subshelling of pipe

After searching the forum, I found that Bash spawns a subshell when using the pipe. I am wondering if there is an option or any other way to turn off this fuctionality. We are pulling over some scripts from a Korn shell environment. I have found ways to work around looping from a pipe (Thanks... (4 Replies)
Discussion started by: jryan
4 Replies

7. Programming

Turn ON/OFF Wireless Card

Hi all, In my program, I am trying to use ioctl to turn on/off the wireless card, using SIOCSIFFLAGS (I am new to it but somebody said it is the most traditional way). However, it seems that I didn't set the flag correctly since the wireless is always on (I have root permission). If any one... (2 Replies)
Discussion started by: tetelee
2 Replies

8. Shell Programming and Scripting

turn list into one line

Hi All i am cat'ing a file and then using cut to get rid of some info, is there a way to turn the list into one line i.e 1 2 3 4 5 into 1 2 3 4 5 (4 Replies)
Discussion started by: ab52
4 Replies

9. UNIX for Beginners Questions & Answers

Just can't turn off ipv6?

I'm running a Linux OS that uses Debian as it's base. A commercial vpn is installed that uses OpenVPN. For some reason, I can't get ipv6 to tunnel properly .... and Ipleak.net shows that my location is being unmasked by ipv6. I've tried kernel commands at boot, I've tried sysctl.conf commands.... (2 Replies)
Discussion started by: benc
2 Replies
NUMSUM(1)						User Contributed Perl Documentation						 NUMSUM(1)

NAME
numsum - numsum program file SYNOPSIS
numsum [-iIcdhrsvxy] <FILE> | numsum [-iIcdhrsvxy] (Input on STDIN from pipeline.) numsum [-iIcdhrsvxy] (Input on STDIN. Use Ctrl-D to stop.) DESCRIPTION
numsum will take all the numbers on stdin and return the sum of those numbers. Currently it only processes the first number on each line. Besides positive numbers, it also handles negative numbers and numbers with decimals. OPTIONS
-i Only return the integer portion of the final sum. -I Only return the decimal portion of the final sum. -c Print out the sum of each column. -r Print out the sum of each row. -x <n> Specify a comma seperated list of columns to print. -y <n> Specify a comma seperated list of rows to print. -s <string> Specify a string to use as a seperator for columns. This defaults to be consecutive whitespace (s+). -h Help: You're looking at it. -V Increase verbosity. -d Debug mode. For developers -q Quiet mode, don't print any warnings. EXAMPLES
Simply add up the numbers in a file. $ numsum numbers.txt 4315 Enter your own numbers on STDIN. The last number is the answer. $ numsum 4 21 98 100 223 Use it in a command pipeline. $ ls -1s | grep .mp3 | numsum -c -x 5 72288 Add up the total byte count in a http log file. $ cat access_log | awk {'print $10'} numsum or numsum -c -x 10 access_log Add up the columns of numbers of a file. $ cat columns 1 6 11 16 21 2 7 12 17 22 3 8 13 18 23 4 9 14 19 24 5 10 15 20 25 $ numsum -c columns 15 40 65 90 115 Add up the 1st, 2nd and 5th columns only. $ numsum -c -x 1,2,5 columns 15 40 115 Add up the rows of numbers of a file. $ numsum -r columns 55 60 65 70 75 Add up the 2nd and 4th rows. $ numsum -r -y 2,4 columns 60 70 SEE ALSO
numaverage(1), numbound(1), numinterval(1), numnormalize(1), numgrep(1), numprocess(1), numrandom(1), numrange(1), numround(1) COPYRIGHT
numsum is part of the num-utils package, which is copyrighted by Suso Banderas and released under the GPL license. Please read the COPYING and LICENSE files that came with the num-utils package Developers can read the GOALS file and contact me about providing submitions or help for the project. MORE INFO
More info on numsum can be found at: http://suso.suso.org/programs/num-utils/ perl v5.10.1 2009-10-31 NUMSUM(1)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy