07-15-2014
I'm sorry Don. Here's my "input"
Quote:
Ruthenium 444 surface
1.00000000000000
10.8727200000000011 0.0000000000000000 0.0000000000000000
0.0000000000000000 9.4160599999999999 0.0000000000000000
0.0000000000000000 0.0000000000000000 21.5000000000000000
Ru
64
Selective dynamics
Direct
My counts should return the values and I want add those values at the 7th line. This is what it should look like-
Quote:
Ruthenium 444 surface
1.00000000000000
10.8727200000000011 0.0000000000000000 0.0000000000000000
0.0000000000000000 9.4160599999999999 0.0000000000000000
0.0000000000000000 0.0000000000000000 21.5000000000000000
Ru
64 2 1 3
Selective dynamics
Direct
The numbers obviously can vary depending upon the count. The input file remains just the same as before after running the script. No change happens. :/
And also, here's the mols file from where it should count the values,
Quote:
H 0.1823565363480026 0.4604101472535956 0.4005758974370104
H 0.2570433232476637 0.6231167698839984 0.3815017011047572
H 0.2135086777493862 0.5877276165535853 0.4600917787525729
C 0.2493254339588567 0.5395125405888599 0.4170749011908661
C 0.3737714706179839 0.4730560514301286 0.4295765297889743
O 0.4284154246482464 0.4351728266366453 0.3710697347999991
Thanks again!
Last edited by saleheen; 07-15-2014 at 12:11 AM..
Reason: Clarification
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am writing a script that needs to accept numbers into a variable by prompting and using the code
read num
case $num in
000)
break
;;
*)
I am fairly new to unix and am loving the versatility of the language but need a little shove in the right... (1 Reply)
Discussion started by: noobian
1 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to define a variable named sin
I already have a variable named cos, which has the value "hello"
I want sin to have the value of "hellothere",
so sin would be something like
sin = $cos & "there"
but I'm not sure that I know the syntax.
Can anyone help?
:confused: (4 Replies)
Discussion started by: sailorliones
4 Replies
3. Shell Programming and Scripting
need a little help with a few tid bits. I wrote a script that checks the resoluion of image files and writes them out to a file then sorts the resolutions by largets Width. Then take the sorted files information and toss all the 835 widths into a seperate file. Ignore the redundancies its a... (1 Reply)
Discussion started by: TiredOrangeCat
1 Replies
4. Solaris
Good morning,
I have a server with solaris 10 that I want to intall remote printers.
I started lpsched deamon without problems with command:
svcadm enable application/print/server
I want to install printers that are defined locally on print server, so:
lpadmin -p <device> -s <print... (2 Replies)
Discussion started by: bonovox
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have to edit a lot of partitions soon and wanted to do so with EMACS rather than VI.
The "disklabel -e -r disknumber" command picks up VI as it's defined, but how do I set "-e" so it uses EMACS instead please?
Thanks...! (2 Replies)
Discussion started by: Bagel08
2 Replies
6. Shell Programming and Scripting
Hey all, I was wondering if someone would take a look at this script I'm working on. I don't know if i have the syntax correct for my variables and if the for loop is written correctly.
any assistance would be greatly appreciated.
#!/usr/bin/bash
###########################################... (12 Replies)
Discussion started by: em23
12 Replies
7. Shell Programming and Scripting
Hello All,
I am trying to figure out how to use the read command. I have a txt file that has rows looking something like this:
1 2 3 4 5 6 7 8 9
where each number represents an entry of various characters deliminated by tabs.
My goal is to set entries 2-7 as a variable/string that I... (3 Replies)
Discussion started by: Torinator
3 Replies
8. Shell Programming and Scripting
Hi folks,
I'm trying to define the following command as alias in .cshrc file:
ls -ltr | grep ^d | awk '{print $9}' | xargs du -hs
I defined it as the following:
alias nirdirs '`ls -ltr | grep "^d" | awk "{print \\$9}" | xargs du -hs`'
I've got the following error when I've run the alias:... (7 Replies)
Discussion started by: nir_s
7 Replies
9. UNIX for Dummies Questions & Answers
In root dir i have created a .profile file and added variable and assigned a path to it:
a = '/dir/dir'
export a
but when i echo (echo $a) the path or use this variable the value or path not getting displayed.
i tried executing the .profile and logging out and logging in, didnt workout. am... (1 Reply)
Discussion started by: abhi_n123
1 Replies
10. Programming
I have the following code and getting the compilation errors
baseLib/DynBaseObj.h:80: error: expected constructor, destructor, or type conversion before ‘(' token
baseLib/DynBaseObj.h:89: error: expected constructor, destructor, or type conversion before ‘(' token
baseLib/DynBaseObj.h:101:... (0 Replies)
Discussion started by: kristinu
0 Replies
CAPSH(1) User Commands CAPSH(1)
NAME
capsh - capability shell wrapper
SYNOPSIS
capsh [OPTION]...
DESCRIPTION
Linux capability support and use can be explored and constrained with this tool. This tool provides a handy wrapper for certain types of
capability testing and environment creation. It also provides some debugging features useful for summarizing capability state.
OPTIONS
The tool takes a number of optional arguments, acting on them in the order they are provided. They are as follows:
--print Display prevailing capability and related state.
-- [args] Execute /bin/bash with trailing arguments. Note, you can use -c 'command to execute' for specific commands.
== Execute capsh again with remaining arguments. Useful for testing exec() behavior.
--caps=cap-set Set the prevailing process capabilities to those specified by cap-set. Where cap-set is a text-representation of
capability state as per cap_from_text(3).
--drop=cap-list Remove the listed capabilities from the prevailing bounding set. The capabilities are a comma separated list of capa-
bilities as recognized by the cap_from_name(3) function. Use of this feature requires that the capsh program is oper-
ating with CAP_SETPCAP in its effective set.
--inh=cap-list Set the inheritable set of capabilities for the current process to equal those provided in the comma separated list.
For this action to succeed, the prevailing process should already have each of these capabilities in the union of the
current inheritable and permitted capability sets, or the capsh program is operating with CAP_SETPCAP in its effec-
tive set.
--user=username Assume the identity of the named user. That is, look up the user's uid and gid with getpwuid(3) and their group mem-
berships with getgrouplist(3) and set them all.
--uid=id Force all uid values to equal id using the setuid(2) system call.
--gid=<id> Force all gid values to equal id using the setgid(2) system call.
--groups=<id-list> Set the supplementary groups to the numerical list provided. The groups are set with the setgroups(2) system call.
--keep=<0|1> In a non-pure capability mode, the kernel provides liberal privilege to the super-user. However, it is normally the
case that when the super-user changes uid to some lesser user, then capabilities are dropped. For these situations,
the kernel can permit the process to retain its capabilities after a setuid(2) system call. This feature is known as
keep-caps support. The way to activate it using this script is with this argument. Setting the value to 1 will cause
keep-caps to be active. Setting it to 0 will cause keep-caps to deactivate for the current process. In all cases,
keep-caps is deactivated when an exec() is performed. See --secbits for ways to disable this feature.
--secbits=N XXX - need to document this feature.
--chroot=path Execute the chroot(2) system call with the new root-directory (/) equal to path. This operation requires
CAP_SYS_CHROOT to be in effect.
--forkfor=sec
--killit=sig
--decode=N This is a convenience feature. If you look at /proc/1/status there are some capability related fields of the follow-
ing form:
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: fffffffffffffeff
CapBnd: ffffffffffffffff
This option provides a quick way to decode a capability vector represented in this form. For example, the missing
capability from this effective set is 0x0100. By running:
capsh --decode=0x0100
we observe that the missing capability is: cap_setpcap.
--supports=xxx As the kernel evolves, more capabilities are added. This option can be used to verify the existence of a capability
on the system. For example, --supports=cap_syslog will cause capsh to promptly exit with a status of 1 when run on
kernel 2.6.27. However, when run on kernel 2.6.38 it will silently succeed.
EXIT STATUS
Following successful execution the tool exits with status 0. Following an error, the tool immediately exits with status 1.
AUTHOR
Written by Andrew G. Morgan <morgan@kernel.org>.
REPORTING BUGS
Please report bugs to the author.
SEE ALSO
libcap(3), getcap(8),setcap(8) and capabilities(7).
libcap 2 2011-04-24 CAPSH(1)