09-27-2010
use as below,
v_data=$2
v_host=$1
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
does anybody knows about wc -l, how to transform it inot a just number?
this script ALWAYS executes the command3!!, However, the value of BMU_RUNNING is 1
case $BMU_RUNNING in
*0) command1
;;
*1) command 2;;
*)command 3;;
esac
The... (3 Replies)
Discussion started by: Santiago
3 Replies
2. Shell Programming and Scripting
Another newbie to Unix scripting Q..
How do you assign a value resulting from a command, such as awk, to a variable.
I am currently trying:-
$awk '{print $1}' file1 > variable1
with no change to $variable1.
The line:
$awk '{print $1}' file1
does print the first line of the... (3 Replies)
Discussion started by: sirtrancealot
3 Replies
3. Shell Programming and Scripting
hi all,
in ksh, how do i assign the output of a find command to a variable, e.g
am trying something like this :
totalNoFiles=$(print find ./ -name "SystemOut*.log");
but when i echo $totalNoFiles it displays
find ./ -name "SystemOut*.log"
instead of the total number of... (2 Replies)
Discussion started by: cesarNZ
2 Replies
4. Shell Programming and Scripting
can we make a global variable and store character values and add other values to that variable ?? for example
a="hello, John"
and can we add value ". How are you? so
a can have
"hello, John. How are you?"
can someone help me?? (2 Replies)
Discussion started by: bonosungho
2 Replies
5. Shell Programming and Scripting
Hi folks.
I have this variable called FirstIN that contains something like this: 001,002,003,004...
I am trying to assign the content of this variable into ModifiedIN but with the following format : 001 002 003 004...(changing the commas for spaces)
I thought about using sed but i am not... (17 Replies)
Discussion started by: Stephan
17 Replies
6. UNIX for Advanced & Expert Users
echo "hello123" | tr -dc '' | wc -c
using this command i can count the no of times a number from 0-9 occurs in the string "hello123"
but how do i save this result inside a variable?
if i do
x= echo "hello123" | tr -dc '' | wc -c
that does not work...plz suggest..thanks (3 Replies)
Discussion started by: arindamlive
3 Replies
7. Shell Programming and Scripting
Hi,
This is the first time I see something like this, and I don't why it happens.
Please give me some help. I am really appreciate it.
Basically I am trying to remove all empty lines of an input..
#!/bin/bash
set -e
set -x
str1=`echo -e "\nhaha" | grep -v ^$`
#str2=`echo -e "\n" |... (4 Replies)
Discussion started by: yoyomano
4 Replies
8. Shell Programming and Scripting
my script is some thing like this
i11="{1,2,3,4,5,6,7,8,9,10,11,}"
echo "enter value"
read value ..............suppose i11
x="$value"
echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,}
but its showing "i11" only.
plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 Replies
9. Shell Programming and Scripting
Unable to get the value to a variable.
set -x
cd $HOME
echo "Enter the server name"
read a
echo $a
i=4
j=1
k = ps -ef | awk '/server1/{ print $4 }' | tail -$i | head -$j`
echo $k
When I do the same in command line it works, however the same does not work when I provide that in the... (1 Reply)
Discussion started by: venkidhadha
1 Replies
10. Shell Programming and Scripting
I have a date column as 06302015 but I need to have variable which extracts 063015.
Am trying something like below but it is not assigning
Please let me know if am missing something. Thanks in advance.
################################
#!/usr/bin/ksh
DT=06302015
... (7 Replies)
Discussion started by: weknowd
7 Replies
LEARN ABOUT XFREE86
vnode
VNODE(9) BSD Kernel Developer's Manual VNODE(9)
NAME
vnode -- internal representation of a file or directory
SYNOPSIS
#include <sys/param.h>
#include <sys/vnode.h>
DESCRIPTION
The vnode is the focus of all file activity in UNIX. A vnode is described by struct vnode. There is a unique vnode allocated for each
active file, each current directory, each mounted-on file, text file, and the root.
Each vnode has three reference counts, v_usecount, v_holdcnt and v_writecount. The first is the number of clients within the kernel which
are using this vnode. This count is maintained by vref(9), vrele(9) and vput(9). The second is the number of clients within the kernel who
veto the recycling of this vnode. This count is maintained by vhold(9) and vdrop(9). When both the v_usecount and the v_holdcnt of a vnode
reaches zero then the vnode will be put on the freelist and may be reused for another file, possibly in another file system. The transition
to and from the freelist is handled by getnewvnode(9), vfree(9) and vbusy(9). The third is a count of the number of clients which are writ-
ing into the file. It is maintained by the open(2) and close(2) system calls.
Any call which returns a vnode (e.g. vget(9), VOP_LOOKUP(9) etc.) will increase the v_usecount of the vnode by one. When the caller is fin-
ished with the vnode, it should release this reference by calling vrele(9) (or vput(9) if the vnode is locked).
Other commonly used members of the vnode structure are v_id which is used to maintain consistency in the name cache, v_mount which points at
the file system which owns the vnode, v_type which contains the type of object the vnode represents and v_data which is used by file systems
to store file system specific data with the vnode. The v_op field is used by the VOP_* macros to call functions in the file system which
implement the vnode's functionality.
VNODE TYPES
VNON No type.
VREG A regular file; may be with or without VM object backing. If you want to make sure this get a backing object, call
vfs_object_create(9).
VDIR A directory.
VBLK A block device; may be with or without VM object backing. If you want to make sure this get a backing object, call
vfs_object_create(9).
VCHR A character device.
VLNK A symbolic link.
VSOCK A socket. Advisory locking will not work on this.
VFIFO A FIFO (named pipe). Advisory locking will not work on this.
VBAD Indicates that the vnode has been reclaimed.
IMPLEMENTATION NOTES
VFIFO uses the "struct fileops" from /sys/kern/sys_pipe.c. VSOCK uses the "struct fileops" from /sys/kern/sys_socket.c. Everything else
uses the one from /sys/kern/vfs_vnops.c.
The VFIFO/VSOCK code, which is why "struct fileops" is used at all, is an artifact of an incomplete integration of the VFS code into the ker-
nel.
Calls to malloc(9) or free(9) when holding a vnode interlock, will cause a LOR (Lock Order Reversal) due to the intertwining of VM Objects
and Vnodes.
SEE ALSO
malloc(9), VOP_ACCESS(9), VOP_ACLCHECK(9), VOP_ADVLOCK(9), VOP_ATTRIB(9), VOP_BWRITE(9), VOP_CREATE(9), VOP_FSYNC(9), VOP_GETACL(9),
VOP_GETEXTATTR(9), VOP_GETPAGES(9), VOP_GETVOBJECT(9), VOP_INACTIVE(9), VOP_IOCTL(9), VOP_LINK(9), VOP_LISTEXTATTR(9), VOP_LOCK(9),
VOP_LOOKUP(9), VOP_OPENCLOSE(9), VOP_PATHCONF(9), VOP_PRINT(9), VOP_RDWR(9), VOP_READDIR(9), VOP_READLINK(9), VOP_REALLOCBLKS(9),
VOP_REMOVE(9), VOP_RENAME(9), VOP_REVOKE(9), VOP_SETACL(9), VOP_SETEXTATTR(9), VOP_STRATEGY(9), VOP_VPTOCNP(9), VOP_VPTOFH(9), VFS(9)
AUTHORS
This manual page was written by Doug Rabson.
BSD
February 13, 2010 BSD