Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Tcsh command for assigning output of awk to variable Post 302901966 by violin on Friday 16th of May 2014 05:15:32 PM
Old 05-16-2014
Because I already have a tcsh file that does what I need and outputs a text file with the mean and stdev numbers. Now all I am trying to do is add a line or two at the very end so when I concatenate all subjects' files, I can keep the values and the subject id in good order.

thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Assigning output of command to a variable

Hi, I'm trying to assign the output of a command to a variable and then concat it with another string, however, it keeps overwriting the original string instead of adding on to the end of the string. Contents of test.txt --> This is a test var1="`head -n 1 test.txt`" echo $var1 (This is a... (5 Replies)
Discussion started by: oma04
5 Replies

2. Shell Programming and Scripting

assigning command output to a shell variable

I have the sql file cde.sql with the below contents: abcdefghij abcwhendefothers sdfghj when no one else when others wwhen%others exception when others Now I want to search for the strings containing when others together and ceck whether that does not occur more than once in the... (2 Replies)
Discussion started by: kprattip
2 Replies

3. Shell Programming and Scripting

Assigning output of command to a variable in shell

hi, I want to assign find command result into some temporary variable: jarPath= find /opt/lotus/notes/ -name $jarFile cho "the jar path $jarPath" where jarPath is temporary variable. Can anybody help on this. Thanks in advance ----Sankar (6 Replies)
Discussion started by: sankar reddy
6 Replies

4. Shell Programming and Scripting

Assigning output to a variable

I am new to unix shell scripting. I was trying to convert each lines in a file to upper case. I know how to convert the whole file. But here i have to do line by line. I am getting it in the below mentioned script #!/bin/bash #converting lower to upper in a file #tr "" "" <file1... (3 Replies)
Discussion started by: jpmena
3 Replies

5. Shell Programming and Scripting

Assigning output of a command to variable

When I run time -p <command>, it outputs: real X.XX user X.XX sys X.XXwhere X.XX is seconds. How I can take just that first number output, the seconds of real time, and assign that to a variable? (9 Replies)
Discussion started by: jeriryan87
9 Replies

6. UNIX for Dummies Questions & Answers

assigning (numeric) command output to var tcsh

Hello, I'm trying to assign a numeric value that is returned from one of my programs to a variable in tcsh. I want to do: @ r10 = './my_prog file 35' where ./my_prog file 35 returns a decimal value, but this doesn't work. How do I achieve the desired result? Janet (4 Replies)
Discussion started by: psran
4 Replies

7. Shell Programming and Scripting

Problem with assigning output of grep + awk to a variable

Hi All, I am getting the output for the following command when i run it on the unix console. --------------------------- grep `whoami` /etc/passwd | awk '{print ($1);}' | cut -d ":" -f3 ---------------------------- But i made it into a script and tried to print the variable, its... (5 Replies)
Discussion started by: meheretoknow
5 Replies

8. UNIX for Dummies Questions & Answers

Assigning the output of a command to a variable, where there may be >1 line returned?

Hello I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable: FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}` When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies

9. Shell Programming and Scripting

Assigning output from awk to variable

I have a script whose contents are as below result= awk 's=100 END {print s }' echo "The result is" $result The desired output is The result is 100 My script is running without exiting and i am also not getting the desired output. Please help (5 Replies)
Discussion started by: bk_12345
5 Replies

10. Shell Programming and Scripting

Expect - assigning UNIX command output to a variable

Hi, I'm writing a script that connects through ssh (using "expect") and then is supposed to find whether a process on that remote machine is running or not. Here's my code (user, host and password are obviously replaced with real values in actual script): #!/usr/bin/expect set timeout 1... (3 Replies)
Discussion started by: oseri
3 Replies
MAC_LOMAC(4)						   BSD Kernel Interfaces Manual 					      MAC_LOMAC(4)

NAME
mac_lomac -- Low-watermark Mandatory Access Control data integrity policy SYNOPSIS
To compile LOMAC into your kernel, place the following lines in your kernel configuration file: options MAC options MAC_LOMAC Alternately, to load the LOMAC module at boot time, place the following line in your kernel configuration file: options MAC and in loader.conf(5): mac_lomac_load="YES" DESCRIPTION
The mac_lomac policy module implements the LOMAC integrity model, which protects the integrity of system objects and subjects by means of an information flow policy coupled with the subject demotion via floating labels. In LOMAC, all system subjects and objects are assigned integrity labels, made up of one or more hierarchal grades, depending on the their types. Together, these label elements permit all labels to be placed in a partial order, with information flow protections and demotion decisions based on a dominance operator describing the order. The hierarchal grade field or fields are expressed as a value between 0 and 65535, with higher values reflecting higher integrity. Three special label component values exist: Label Comparison low dominated by all other labels equal equal to all other labels high dominates all other labels The ``high'' label is assigned to system objects which affect the integrity of the system as a whole. The ``equal'' label may be used to indicate that a particular subject or object is exempt from the LOMAC protections. For example, a label of ``lomac/equal(equal-equal)'' might be used on a subject which is to be used to administratively relabel anything on the system. Almost all system objects are tagged with a single, active label element, reflecting the integrity of the object, or integrity of the data contained in the object. File system objects may contain an additional auxiliary label which determines the inherited integrity level for new files created in a directory or the alternate label assumed by the subject upon execution of an executable. In general, objects labels are represented in the following form: lomac/grade[auxgrade] For example: lomac/10[2] lomac/low Subject labels consist of three label elements: a single (active) label, as well as a range of available labels. This range is represented using two ordered LOMAC label elements, and when set on a process, permits the process to change its active label to any label of greater or equal integrity to the low end of the range, and lesser or equal integrity to the high end of the range. In general, subject labels are rep- resented in the following form: lomac/singlegrade(lograde-higrade) Modification of objects is restricted to access via the following comparison: subject::higrade >= target-object::grade Modification of subjects is the same, as the target subject's single grade is the only element taken into comparison. Demotion of a subject occurs when the following comparison is true: subject::singlegrade > object::grade When demotion occurs, the subject's singlegrade and higrade are reduced to the object's grade, as well as the lograde if necessary. When the demotion occurs, in addition to the permission of the subject being reduced, shared mmap(2) objects which it has opened in its memory space may be revoked according to the following sysctl(3) variables: o security.mac.lomac.revocation_enabled o security.mac.enforce_vm o security.mac.mmap_revocation o security.mac.mmap_revocation_via_cow Upon execution of a file, if the executable has an auxiliary label, and that label is within the current range of lograde-higrade, it will be assumed by the subject immediately. After this, demotion is performed just as with any other read operation, with the executable as the tar- get. Through the use of auxiliary labels, programs may be initially executed at a lower effective integrity level, while retaining the abil- ity to raise it again. These rules prevent subjects of lower integrity from influencing the behavior of higher integrity subjects by preventing the flow of informa- tion, and hence control, from allowing low integrity subjects to modify either a high integrity object or high integrity subjects acting on those objects. LOMAC integrity policies may be appropriate in a number of environments, both from the perspective of preventing corruption of the operating system, and corruption of user data if marked as higher integrity than the attacker. The LOMAC security model is quite similar to that of mac_biba(4) and mac_mls(4) in various ways. More background information on this can be found in their respective man pages. SEE ALSO
mmap(2), sysctl(3), mac(4), mac_biba(4), mac_bsdextended(4), mac_ifoff(4), mac_mls(4), mac_none(4), mac_partition(4), mac_portacl(4), mac_seeotheruids(4), mac_test(4), mac(9) HISTORY
The mac_lomac policy module first appeared in FreeBSD 5.0 and was developed by the TrustedBSD Project. AUTHORS
This software was contributed to the FreeBSD Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (``CBOSS''), as part of the DARPA CHATS research program. BSD
December 11, 2002 BSD
All times are GMT -4. The time now is 04:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy