12-03-2009
How do you expect to get a real answer if you keep changing the question?
To change the script to do what you want, modify the selectors.
Just describing the problem accurately will give you a hint as to what you should do.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have no idea why I can't get this to work, if anybody can help i would appreciate it.
#!/bin/bash
x=`cat counter.txt | wc -l`
y= '$x / 7'
printf "%d People have visited this page" $y
:confused: (2 Replies)
Discussion started by: paladyn_2002
2 Replies
2. Shell Programming and Scripting
I am using egrep to extract numbers from a file and storing them as variables in a script. But I am not able to do any arithmetic operations on the variables using "expr" because it stores them as char and not integers. Here is my code and the error I get. Any help will be appreciated.
#!/bin/sh... (3 Replies)
Discussion started by: emjayshaikh
3 Replies
3. UNIX for Dummies Questions & Answers
Hi, All,
I have a file, its content is as follows:
100 150
120 135
140 170
I want to insert a column, its content is determined by the difference between the two values in the same line, if the difference is less than 20, the new value is 1, otherwise is 0.
after the operation, the... (1 Reply)
Discussion started by: Jenny.palmy
1 Replies
4. Shell Programming and Scripting
Hi all,
I would appreciate if anyone knows how to perform adding to date.
As for normal date, i can easily plus with any number.
But when it comes to month end say for example 28 Jun, i need to perform a plus with number 3, it will not return 1 Jul.
Thanks in advance for your help. (4 Replies)
Discussion started by: agathaeleanor
4 Replies
5. Shell Programming and Scripting
Hi
I have a file with 3 columns. say,
infile:
1 50 68
34 3 23
23 4 56
-------
-------
I want to generate n files from this file using a loop so that 1st column in output file is (column1 of infile/(2*n+2.561))
I am doing like this:
for ((i=1; i<=3; i++))
do
a=`echo... (3 Replies)
Discussion started by: Surabhi_so_mh
3 Replies
6. Shell Programming and Scripting
I am writing a script in zsh shell, it fetchs a number from a file using the awk command, store it as a variable, which in my case is a small number 0.62000. I want to change this number by multiplying it by 1000 to become 620.0 using the command in the script
var2=$((var1*1000))
trouble is... (2 Replies)
Discussion started by: piynik
2 Replies
7. UNIX for Dummies Questions & Answers
input:
Name|Operation
rec_10|1+2+2-
Output:
rec_10|1
Basically I am trying to calculate the result of "the path" in $3 where the operators follow the number and not preceding them like we normally do:
rec_10: +1+2-2=1
But I realise (I am sure there is a good reason for that) that awk... (7 Replies)
Discussion started by: beca123456
7 Replies
8. Shell Programming and Scripting
Hi,
Here is the script i try to perform arithmetic operation in two variables .
git branch -r | while read brname ; do
REV_COMMITS=`git rev-list --count $brname`
echo "$brname has $REV_COMMITS"
(( TOTAL = TOTAL + REV_COMMITS ))
echo "in loop" $TOTAL
done
echo "total is " $TOTAL
... (3 Replies)
Discussion started by: greet_sed
3 Replies
9. Shell Programming and Scripting
Hi,
I've this following text file
FileVersion = 1.03
Filetype = meteo_on_curvilinear_grid
TIME = 0 hours since 2016-10-03 12:00:00 +00:00
-6.855 -6.828 -6.801 -6.774 -6.747 -6.719 -6.691 -6.663 -6.634 -6.606 -6.577 -6.548 -6.519 -6.489
TIME = 0 hours since... (2 Replies)
Discussion started by: xisan
2 Replies
10. How to Post in the The UNIX and Linux Forums
I have to do some arithmetic operation on Field 8 which is calculated by Field 9/Field 7
Suppose i have data like :
0800123456|JAN|2017|JAN|2018|0800123456|0|0.0000|0.00|
0800234567|JAN|2017|JAN|2018|0800234567|4|2.5812|10.32|
0800666666|JAN|2017|JAN|2018|0800666666|2|1.7255|3.45|... (0 Replies)
Discussion started by: pumrao
0 Replies
LEARN ABOUT REDHAT
manipulators
FBB::Manipulators(3bobcat) Manipulators FBB::Manipulators(3bobcat)
NAME
FBB::Manipulators - Manipulators defined in the FBB namespace
DESCRIPTION
Various manipulators are defined within the FBB namespace. This manual page provides an overview of the manipulators that are currently
defined in the FBB namespace.
MANIPULATORS
o FBB::center:
defined in bobcat/align This manipulator can be specified when constructing an FBB::Align object to indicate that a table column
should center its contents.
o FBB::decindent:
defined in bobcat/indent This manipulator reduces the indentation level.
o FBB::def:
defined in bobcat/table This manipulator `completes' a Table object to a full rectangular object. It can be inserted into a Table
object.
o FBB::err:
defined in bobcat/msg Generates an error message.
o FBB::fatal:
defined in bobcat/msg Generates a fatal message, followed by an Errno(1) exception.
o FBB::fs:
defined in bobcat/tablebuf Starts the definition of the next element in a table.
o FBB::info:
defined in bobcat/msg Generates an informational message.
o FBB::incindent:
defined in bobcat/indent This manipulator will increment the indentation level.
o FBB::indent:
defined in bobcat/indent This manipulator inserts the currently defined number of indentation blanks into an ostream.
o FBB::indentdec:
defined in bobcat/indent This manipulator will insert, then reduce the indentation level.
o FBB::indentinc:
defined in bobcat/indent This manipulator will insert, then increment the indentation level.
o FBB::lm:
defined in bobcat/ofoldstreambuf This manipulator sets the left margin of FBB::OFoldStream objects.
o FBB::mlm:
defined in bobcat/ofoldstreambuf This manipulator modifies (alters) the left margin of FBB::OFoldStream objects.
o FBB::nlindent:
defined in bobcat/indent This manipulator will insert a newline, then indent.
o FBB::rs:
defined in bobcat/tablebuf Starts the definition of the next row in a table.
o FBB::spool:
defined in bobcat/msg Generates a (partial) informational message.
o FBB::warning:
defined in bobcat/msg Generates a warning message.
SEE ALSO
bobcat(7), columnwidth(3bobcat), equalwidth(3bobcat), errno(3bobcat), indent(3bobcat), lm(3bobcat), mlm(3bobcat), msg(3bobcat), table(3bob-
cat)
BUGS
None Reported.
DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature;
o bobcat_3.01.00-x.tar.gz: source archive;
o bobcat_3.01.00-x_i386.changes: change log;
o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::Manipulators(3bobcat)