hello guys i m new to shell scripting and can't find out why this structure is not right
I m guessing this happens because $LINESUM is a string . so how can i do this ?
i want my script to do so many loops as the number of the lines of one custom file.
Code:
#!/bin/bash
echo give me path name
read GIVENPATH
wc -l $GIVENPATH | cut -d" " -f1 $LINESUM
COUNTER=1
while [ $COUNTER -le $LINESUM ]; do
echo $COUNTER
((COUNTER++))
done
Hi,
i want to read a text file whose content(single line) will be a number like 1 or 2 or 3 ..... what i want to do is to read the file and increment the content of the file, using unix scripting.
Regards,
Senthil Kumar Siddhan. (2 Replies)
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
Hi,
i'd like to implmeent emergency shutdown script in case our AC dies and the temperature rises too high.
I can get core temperatures with:
sensors | grep Core | cut -c15-16
Result is:
23
18
18
13
21
18
15
17
How can I check if any of the cores is above eg. 80 (that's C of... (2 Replies)
Hi,
from the manual
listen(2): listen for connections on socket - Linux man page
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three... (3 Replies)
hi
I want to write a function which takes int as input and returns a string like this.
char GetString(int iNo)
{
switch(iNo)
{
case 0:
return "Zero";
break;
case 1:
return "One";
break;
}
}
void main()
{
int i;
printf("Enter... (1 Reply)
Hi,
I have the following requirement.
There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"
I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Hi,
I have column 5 in a file which contains string like this for ex.
RP11-125O5.2
SLCO1B1
CAPN1
FRMPD2
TXNL4B
So I do by
data = )]
ValueError: invalid literal for int() with base 10: 'R'
Can someday tell me how to convert this column into int successfully.
Thank You in... (7 Replies)
Discussion started by: rossi
7 Replies
LEARN ABOUT DEBIAN
types.db
TYPES.DB(5) collectd TYPES.DB(5)NAME
types.db - Data-set specifications for the system statistics collection daemon collectd
SYNOPSIS
bitrate value:GAUGE:0:4294967295
counter value:COUNTER:U:U
if_octets rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
DESCRIPTION
The types.db file contains one line for each data-set specification. Each line consists of two fields delimited by spaces and/or horizontal
tabs. The first field defines the name of the data-set, while the second field defines a list of data-source specifications, delimited by
spaces and, optionally, a comma (",") right after each list-entry.
The format of the data-source specification has been inspired by RRDtool's data-source specification. Each data-source is defined by a
quadruple made up of the data-source name, type, minimal and maximal values, delimited by colons (":"): ds-name:ds-type:min:max. ds-type
may be either ABSOLUTE, COUNTER, DERIVE, or GAUGE. min and max define the range of valid values for data stored for this data-source. If U
is specified for either the min or max value, it will be set to unknown, meaning that no range checks will happen. See rrdcreate(1) for
more details.
FILES
The location of the types.db file is defined by the TypesDB configuration option (see collectd.conf(5)). It defaults to collectd's shared
data directory, i. e. prefix/share/collectd/.
CUSTOM TYPES
If you want to specify custom types, you should do so by specifying a custom file in addition to the default one (see FILES) above. You can
do that by having multiple TypesDB statements in your configuration file or by specifying more than one file in one line.
For example:
TypesDB "/opt/collectd/share/collectd/types.db"
TypesDB "/opt/collectd/etc/types.db.custom"
Note: Make sure to make this file available on all systems if you're sending values over the network.
SEE ALSO collectd(1), collectd.conf(5), rrdcreate(1)AUTHOR
collectd has been written by Florian Forster <octo at verplant.org>.
This manpage has been written by Sebastian Harl <sh at tokkee.org>.
5.1.0 2012-04-02 TYPES.DB(5)