Use a here string
Use a here document
Use a code block (the variables can be used inside the code block)
Use the if statement as block and test if the variables are being read (the variables can be used inside the if statement).
This User Gave Thanks to Scrutinizer For This Post:
Hi :)
The next script campares two files File1-Line1 vs File2-Line1, File1-Line1 vs File2-Line2... only if line contains "AS-", if LineX is not in File2 writes in aux, but "valor" is allways=1 never changes! :confused: What is wrong?
valor changes to 0 before break, after brake is again 1
... (3 Replies)
How...
can I read input by a user character by cahracter. And assign each character from the string to a variable?
Any help would be greatly appreciated!
Thank you! (1 Reply)
Hi
I am trying to write a function that needs to be able to assign the last run shell command to a variable. The actual command string itself not the exit code of the command.
I am using the bash command recall ability to do this as follows:
alias pb='ps | grep ash' ... (3 Replies)
i have a file in this format
curyymm PRVYYMM CDDMmmYY bddMmmyy eddMmmyy
--------- ------- ------------ ---------- -----------
0906 0905 09Jun09 01Jun09 30Jun09
----------- --------- ------------ ------------ -----------
i need to read the... (5 Replies)
I have a csv file with the values seperated by commas.I want to extract these values one by one and assign to a variable using shell script.Any ideas or code? (11 Replies)
Hi all,
I want write a csh script which must be able:
1.read a file
2.assign value in file as variable
and can i use read in csh script?
thx (2 Replies)
Hi ,I am trying to assign string to variable ,but it doesn't work
Also could you show me different ways to use grep,(I am trying to get the first,second and first column form file,and I am counting the chars)
let name=`grep "$id" product | cut -c6-20` (25 Replies)
Hi,
I have a text file with multiple lines, each having data in the below format <DOB>,<ADDRESS>
I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it.
Using the following code prints the values... (12 Replies)
Hello,
I am using below code for reading from a file and assigning the values to a variable , but it is loosing the value after the loop , please suggest to retain the value of the variable after the loop ,
while IFS=: read -r line
do
set $dsc=$line
echo 'printing line variable ' $line... (1 Reply)
Discussion started by: ParthThakkar
1 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)