((expression))
The expression is evaluated according to the rules described
below under ARITHMETIC EVALUATION. If the value of the expres-
sion is non-zero, the return status is 0; otherwise the return
status is 1. This is exactly equivalent to let "expression".
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Shell script to find sum of first n numbers of Fibonacci series
2. Relevant commands, code, scripts,... (0 Replies)
Hi all
I want to use the filename passed into a shell script within the shell it self. The file will be passed as shown below
./myScript < myFile.file
i tried $1 but i think since myFile is not passed as a command line arg its not saving the file name in $1
any help is appreciated. (5 Replies)
i want to write a shell script function that will ftp the files passed in the command line . i have written a shell script for ftp but how will it do for all files passed in command line argument ,
i am passing 4 files as argument
./ftp.sh file1 file2 file3 file4
code written by me... (5 Replies)
Can someone let me know how could I achieve this
In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
I want to make a script that check for the argument passed to it and generates an error in case any character/string argument passed to it.
I am using below code, but its not working. can anyone help.
#!/bin/bash
if ]; then
echo 'An integer argument is passed to the script hence... (3 Replies)
Hi all,
$ echo $SHELL
/bin/bash
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
Hi All,
I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them
abc.sh
----------
export Numbr_Parms=$#
export a=1
while
do
export... (3 Replies)
Hi Experts,
I have been trying to work on a simple shell script that will just add the two argument passed to it. Here is what i tried :
#!/bin/bash
welcome(){
echo "Welcome to this Progg. which will accept two parameter"
}
main_logic(){
arg=$#
echo "Number of argument passed is... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
LEARN ABOUT DEBIAN
mstack
VIEW-OS(1) General Commands Manual VIEW-OS(1)NAME
mstack - networking stack selection
SYNOPSIS
mstack [-hv] [-o protocol list] stack_mountpoint command
DESCRIPTION
In View-OS multiple networking stacks are available to processes at the same time. View-OS supports the msocket(2) system call. mstack
defines the default stack (for each address family) that is used when msocket refers to a NULL pathname for its stack. mstack provides
also a backward compatibility for all the programs using the obsolete socket(2) system call. The stack mountpoint identifies the stack. In
ViewOS it is the mountpoint where the stack was mounted (by mount(2)(8). In fact the call:
"socket(domain,type,protocol)"
is equivalent to:
"msocket(NULL,domain,type protocol)"
mstacks changes the default stack for the desired protocol families and executes the command (by execve(2)).
OPTIONS -h prints the mstack command usage
-v sets the verbose mode on
-o defines the list of protocols. Without a -o option, mstack redefines the default stack for all protocols families. The list of proto-
cols may include the a comma separated sequence of the following items: all, unix (or simply u), ipv4 (4), ipv6 (6), netlink (n),
packet (p), bluetooth (b), irda (i), ip (which include all ip related protocols ipv4, ipv6, netlink and packet), #n where n is the num-
ber of protocol. Each item can be prefixed by + or - to specify whether the protocol/group of protocols must be added or removed from
the set.
EXAMPLES
mstack /dev/net/lwip ip addr
lists the address managed by the stack mounted on /dev/net/lwip.
exec mstack /dev/net/null bash
disables the standard stack in a new bash (which overcomes the current one).
mstack -o ip /dev/net/lwip bash
starts a new bash which uses the stack /dev/net/lwip for ipv4 and ipv6 but not for the other protocols.
mstack -o -unix /dev/net/lwip bash
starts a new bash which uses the stack /dev/net/lwip for all protocols but AF_UNIX.
mstack -o +ip,-ipv6 /dev/net/lwip bash
starts a new bash which uses the stack /dev/net/lwip for ipv4, netlink, packet but not ipv6.
SEE ALSO umview(1), kmview(1), msocket(3), umnetnative(9), umnetnull(9), umnetlwipv6(9), unix(7), ip(7), ipv6(7), netlink(7), packet(7).
AUTHORS
View-OS is a project of the Computer Science Department, University of Bologna. Project Leader: Renzo Davoli.
<http://www.sourceforge.net/projects/view-os>
Howto's and further information can be found on the project wiki <wiki.virtualsquare.org>.
VIEW-OS: a process with a view April 23, 2008 VIEW-OS(1)