Sponsored Content
Top Forums Shell Programming and Scripting Need to extract some lines from output via AWK Post 302428453 by agn on Thursday 10th of June 2010 03:37:29 AM
Old 06-10-2010
Try
Code:
$ awk '/^[^/]/{ print x"/"$(NF - 2) } { x=$0 }' inputfile
/var/tmp/asirohi/jdk/jre/bin/classic/libjvm.a
/var/tmp/asirohi/jdk/jre/bin/j9vm/libjdk.a

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need awk to extract lines and sort

Hi, My data looks like this. CHR SNP BP A1 TEST NMISS OR STAT P 0 SNP_A-8282315 0 2 ADD 1530 1.074 0.7707 0.4409 0 SNP_A-8282315 0 2... (11 Replies)
Discussion started by: genehunter
11 Replies

2. Shell Programming and Scripting

AWK: How to extract text lines between two strings

Hi. I have a text test1.txt file like:Receipt Line1 Line2 Line3 End Receipt Line4 Line5 Line6 Canceled Receipt Line7 Line8 Line9 End (9 Replies)
Discussion started by: TQ3
9 Replies

3. Shell Programming and Scripting

Awk to extract lines with a defined number of characters

This is my problem, my file (file A) contains the following information: Now, I would like to create a file (file B) containing only the lines with 10 or more characters but less than 20 with their corresponding ID: Then, I need to compare the entries and determine their frequency. Thus, I... (7 Replies)
Discussion started by: Xterra
7 Replies

4. Shell Programming and Scripting

extract nth line of all files and print in output file on separate lines.

Hello UNIX experts, I have 124 text files in a directory. I want to extract the 45678th line of all the files sequentialy by file names. The extracted lines should be printed in the output file on seperate lines. e.g. The input Files are one.txt, two.txt, three.txt, four.txt The cat of four... (1 Reply)
Discussion started by: yogeshkumkar
1 Replies

5. UNIX for Dummies Questions & Answers

Extract lines in awk

Hi, I have one file of the following format: TBCD, 1521, 14585236, NSDFC XSDF, 1845, 14525426, SDFFF SDFC, 4524, 14523655, SDNCV ASBC, 1845, 48754251, SDFFC ASBC, 1845, 54542512, SDFFF ASBC, 1845, 34212512, NSDFC ASBC, 1845, 16890234, ASFCH MNDG, 1896, 15842642, SFTDD SDFC, 8524,... (4 Replies)
Discussion started by: alex2005
4 Replies

6. UNIX for Dummies Questions & Answers

awk - Extract 4 lines in Column to Rows Tab Delimited between tags

I have tried the following to no avail. xargs -n8 < test.txt awk '{if(NR%6!=0){p=""}else{p="\n"};printf $0" "p}' Mod_Alm_log.txt > test.txt I have tried different variations of the above, the problem is mixes lines together. And it includes the tags "%a and %A" I need them to be all tab... (16 Replies)
Discussion started by: mytouchsr
16 Replies

7. Shell Programming and Scripting

awk to output lines less than number

I am trying to output all lines in a file where $7 is less than 30. The below code does create a result file, but with all lines in the original file. The original file is tab deliminated is that the problem? Thank you :). awk 'BEGIN{FS=OFS=","} $7 < 30 {print}' file.txt > result.txt... (3 Replies)
Discussion started by: cmccabe
3 Replies

8. Shell Programming and Scripting

Remove lines from output in files using awk

I have two large files (~250GB) that I am trying to remove the where GT: 0/0 or 1/1 or 2/2 for both files. I was going to use a bash with the below awk, which I think will find each line but how do I remove that line is that condition is found? Thank you :). Input 20 60055 . A ... (4 Replies)
Discussion started by: cmccabe
4 Replies

9. Shell Programming and Scripting

awk to retain header lines in output

The awk below executes and produces the current output, which is correct, except I can not seem to include the header lines # and ## in the output as well. I tried adding !/^#/ thinking that it would skip the lines with # and output them but the entire file prints as is. Thank you :). file ... (8 Replies)
Discussion started by: cmccabe
8 Replies

10. Shell Programming and Scripting

Extract lines from output

Hi everyone, I have the following string that repeats in a file. I want to get the following output : "CDN_NF2_SGW_INT_443" 172.23.120.40:443 source-address-translation { pool /Common/SNAT_EXTERNAL_62.179.94.194 and parse the file till the end . (3 Replies)
Discussion started by: liviusbr
3 Replies
sysadm_su_selinux(8)					     SELinux Policy sysadm_su					      sysadm_su_selinux(8)

NAME
sysadm_su_selinux - Security Enhanced Linux Policy for the sysadm_su processes DESCRIPTION
Security-Enhanced Linux secures the sysadm_su processes via flexible mandatory access control. The sysadm_su processes execute with the sysadm_su_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. For example: ps -eZ | grep sysadm_su_t ENTRYPOINTS
The sysadm_su_t SELinux type can be entered via the su_exec_t file type. The default entrypoint paths for the sysadm_su_t domain are the following: /usr/(local/)?bin/ksu, /bin/su, /usr/bin/su, /usr/bin/kdesu PROCESS TYPES
SELinux defines process types (domains) for each process running on the system You can see the context of a process using the -Z option to ps Policy governs the access confined processes have to files. SELinux sysadm_su policy is very flexible allowing users to setup their sysadm_su processes in as secure a method as possible. The following process types are defined for sysadm_su: sysadm_su_t, sysadm_sudo_t Note: semanage permissive -a sysadm_su_t can be used to make the process type sysadm_su_t permissive. SELinux does not deny access to per- missive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. sysadm_su policy is extremely flexible and has several booleans that allow you to manipulate the policy and run sysadm_su with the tightest access possible. If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server, you must turn on the authlo- gin_nsswitch_use_ldap boolean. Disabled by default. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default. setsebool -P deny_ptrace 1 If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default. setsebool -P domain_fd_use 1 If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default. setsebool -P domain_kernel_load_modules 1 If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. setsebool -P fips_mode 1 If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default. setsebool -P global_ssp 1 If you want to allow confined applications to run with kerberos, you must turn on the kerberos_enabled boolean. Enabled by default. setsebool -P kerberos_enabled 1 If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default. setsebool -P nis_enabled 1 If you want to allow confined applications to use nscd shared memory, you must turn on the nscd_use_shm boolean. Disabled by default. setsebool -P nscd_use_shm 1 If you want to enable polyinstantiated directory support, you must turn on the polyinstantiation_enabled boolean. Disabled by default. setsebool -P polyinstantiation_enabled 1 If you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Disabled by default. setsebool -P use_nfs_home_dirs 1 If you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default. setsebool -P use_samba_home_dirs 1 NSSWITCH DOMAIN
If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server for the sysadm_su_t, sysadm_sudo_t, you must turn on the authlogin_nsswitch_use_ldap boolean. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow confined applications to run with kerberos for the sysadm_su_t, sysadm_sudo_t, you must turn on the kerberos_enabled boolean. setsebool -P kerberos_enabled 1 MANAGED FILES
The SELinux process type sysadm_su_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. faillog_t /var/log/btmp.* /var/log/faillog.* /var/log/tallylog.* /var/run/faillock(/.*)? initrc_var_run_t /var/run/utmp /var/run/random-seed /var/run/runlevel.dir /var/run/setmixer_flag krb5_host_rcache_t /var/cache/krb5rcache(/.*)? /var/tmp/nfs_0 /var/tmp/DNS_25 /var/tmp/host_0 /var/tmp/imap_0 /var/tmp/HTTP_23 /var/tmp/HTTP_48 /var/tmp/ldap_55 /var/tmp/ldap_487 /var/tmp/ldapmap1_0 lastlog_t /var/log/lastlog.* security_t /selinux COMMANDS
semanage fcontext can also be used to manipulate default file context mappings. semanage permissive can also be used to manipulate whether or not a process type is permissive. semanage module can also be used to enable/disable/install/remove policy modules. semanage boolean can also be used to manipulate the booleans system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was auto-generated using sepolicy manpage . SEE ALSO
selinux(8), sysadm_su(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) sysadm_su 14-06-10 sysadm_su_selinux(8)
All times are GMT -4. The time now is 03:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy