10 More Discussions You Might Find Interesting
1. Linux
Hi,
My question is how to calculate the quarter end date according to the current date in shell script? (2 Replies)
Discussion started by: Divya_1234
2 Replies
2. Shell Programming and Scripting
Hi,
I need to calculate the average of the following values using shell scripitng.
Can anyone please suggest a solution?
... (10 Replies)
Discussion started by: karan pratap si
10 Replies
3. UNIX for Dummies Questions & Answers
hello,
I have implemented this command :
tshark -eth0 -T fiels -e frame.time et sip.Request-Line -z sip,stat > test2.txt
the result of this command : test.txt:
Aug 27, 2013 23:06:47.334270000 INVITE
Aug 27, 2013 23:06:47.335045000 SIP/2.0 401 Unauthorized
Aug 27, 2013... (1 Reply)
Discussion started by: Amouna
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a script which does report the cpu usuage, there are few output parameter/fields displayed from the script. My problem is I have monitor the output and decide
which cpu number (column 2) has maximum value (column 6).
Since the output is displayed/updated every seconds, it's very... (1 Reply)
Discussion started by: Optimus81
1 Replies
5. Shell Programming and Scripting
shell script to calculate difference between 2 dates (3 Replies)
Discussion started by: gredpurushottam
3 Replies
6. Shell Programming and Scripting
hello,
please can you help me.
jj and kk are two numbers which are the result of an sql program.
I would like to calculate the ratio jj/kk*100.
I have done this:
ratio=$((jj/kk * 100)) or ratio=`expr $jj \/ expr $kk) but the result is 0
What can i do?
Thanks for help. (3 Replies)
Discussion started by: likeaix
3 Replies
7. Shell Programming and Scripting
I just want to know, how do we calculate the months in shell scripting.
If i give the input as 20-01-2011, the output should be 20-02-2011, 20-03-2011 or 20-04-2011........
How do i get this ?
Cheers. (6 Replies)
Discussion started by: sachin24
6 Replies
8. Shell Programming and Scripting
Dear all,
Please help me to write a script that can calculate the size of files.
For example: I have a directory which contain thousands of files. I need to know the size of files that their name begin with abc_123
Thank all!! (4 Replies)
Discussion started by: hainguyen1402
4 Replies
9. Shell Programming and Scripting
I have a txt file which now has the following output
Sat Mar 6 04:00:01
Sat Mar 6 04:02:09
processing 585
Sat Mar 6 17:00:01
Sat Mar 6 17:00:58
processing 109
Sun Mar 7 04:00:01
Sun Mar 7 04:00:51
processing 309
Sun Mar 7 17:00:01
Sun Mar 7 17:00:41
processing 48
I want output as... (1 Reply)
Discussion started by: gubbu
1 Replies
10. Shell Programming and Scripting
Hi,
I am having two variables
IP="10.150.12.1"
netmask="255.255.255.0"
To get network number, I know that a bitwise & will help.
networkno=IP & netmask
My code is
#!/usr/bin/ksh
ip="10.150.12.1"
netmask="255.255.255.0"
networkno="$ip" & "$netmask"
echo $networkno
I am... (7 Replies)
Discussion started by: chaitanyapn
7 Replies
ATF-SH(1) BSD General Commands Manual ATF-SH(1)
NAME
atf-sh [-s shell] -- interpreter for shell-based test programs
SYNOPSIS
atf-sh script
DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library.
atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter-
preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not
use any non-standard extensions.
The following options are available:
-s shell Specifies the shell to use instead of the value provided by ATF_SHELL.
ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes.
ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes.
ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a
specific interpreter.
EXAMPLES
Scripts using atf-sh(3) should start with:
#! /usr/bin/env atf-sh
Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode
the path to atf-sh in the script and then use the -s option afterwards as a single parameter:
#! /path/to/bin/atf-sh -s/bin/bash
ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts.
SEE ALSO
atf-sh(3)
BSD
September 27, 2014 BSD