07-13-2012
Do all values in 10th column contain exactly 2 zeroes at the end?
Last edited by balajesuri; 07-13-2012 at 01:03 PM..
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies
2. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
3. UNIX for Dummies Questions & Answers
I have a script problem that I am not able to solve due my very limited understanding of unix/awk.
This is the contents of test.sh
awk '{print $1}'
From the prompt if I enter:
./test.sh Hello World
I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies
4. Shell Programming and Scripting
input1
a_a a/a 10 100
a1 a_a 20 200
b1 b_b 30 300
input2
a_a a/a xxx yyy
a1 a1 lll ppp
b1 b_b kkk ooo
output
a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies
5. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
6. Shell Programming and Scripting
Hi,
I have a situation to compare one file, say file1.txt with a set of files in directory.The directory contains more than 100 files.
To be more precise, the requirement is to compare the first field of file1.txt with the first field in all the files in the directory.The files in the... (10 Replies)
Discussion started by: anandek
10 Replies
7. Shell Programming and Scripting
below is the output xml string from some other command and i will be parsing it using awk
cat /tmp/alerts.xml
<Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies
8. Shell Programming and Scripting
Hi,
I am trying to pass awk field to a command line executed within awk (need to convert a timestamp into formatted date).
All my attempts failed this far.
Here's an example.
It works fine with timestamp hard-codded into the command
echo "1381653229 something" |awk 'BEGIN{cmd="date -d... (4 Replies)
Discussion started by: tuxer
4 Replies
LED(4) BSD Kernel Interfaces Manual LED(4)
NAME
led -- API for manipulating LED's, lamps and other annunciators
SYNOPSIS
#include <dev/led/led.h>
typedef void led_t(void *priv, int onoff);
struct cdev *
led_create_state(led_t *func, void *priv, char const *name, int state);
struct cdev *
led_create(led_t *func, void *priv, char const *name);
void
led_destroy(struct cdev *);
DESCRIPTION
The led driver provides generic support for handling LEDs, lamps and other annunciators.
The hardware driver must supply a function to turn the annunciator on and off and the device name of the annunciator relative to /dev/led/.
The priv argument is passed back to this on/off function and can be used however the hardware driver sees fit.
The lamp can be controlled by opening and writing ASCII strings to the /dev/led/bla device.
In the following, we will use this special notation to indicate the resulting output of the annunciator:
* The annunciator is on for 1/10th second.
_ The annunciator is off for 1/10th second.
State can be set directly, and since the change happens immediately, it is possible to flash the annunciator with very short periods and syn-
chronize it with program events. It should be noted that there is a non-trivial overhead, so this may not be usable for benchmarking or mea-
suring short intervals.
0 Turn the annunciator off immediately.
1 Turn the annunciator on immediately.
Flashing can be set with a given period. The pattern continues endlessly.
f _*
f1 _*
f2 __**
f3 ___***
...
f9 _________*********
Three high-level commands are available:
d%d Numbers. Each digit is blinked out at 1/10th second, zero as ten pulses. Between digits a one second pause and after the last
digit a two second pause after which the sequence is repeated.
s%s String. This gives full control over the annunciator. Letters 'A' ... 'J' turn the annunciator on for from 1/10th to one full
second. Letters 'a' ... 'j' turn the annunciator off for 1/10th to one full second. Letters 'u' and 'U' turn the annunciator
off and on respectively when the next UTC second starts. Unless terminated with a '.', the sequence is immediately repeated.
m%s Morse.
'.' becomes '_*'
'-' becomes '_***'
' ' becomes '__'
'
' becomes '____'
The sequence is repeated after a one second pause.
FILES
/dev/led/*
EXAMPLES
A 'd12' flashes the lamp
*__________*_*______________________________
A 'sAaAbBa' flashes
*_*__**_
/usr/bin/morse -l "Soekris rocks" > /dev/led/error
SEE ALSO
morse(6)
HISTORY
The led driver first appeared in FreeBSD 5.2.
AUTHORS
This software was written by Poul-Henning Kamp <phk@FreeBSD.org>.
This manual page was written by Sergey A. Osokin <osa@FreeBSD.org> and Poul-Henning Kamp <phk@FreeBSD.org>.
BSD
April 24, 2007 BSD