Sponsored Content
Full Discussion: Cut last Field
Top Forums Shell Programming and Scripting Cut last Field Post 302257388 by sfaqih on Wednesday 12th of November 2008 03:46:32 AM
Old 11-12-2008
Thanks brother it works
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to use cut to get the last field of a string?

If I am not sure of how many fields a string has, say STR=/homt/root/dir1/dir2/../dirn how to use "cut -d/ -f" to get dirn ? (3 Replies)
Discussion started by: meili100
3 Replies

2. Shell Programming and Scripting

How do I cut out this field?

Hello, In a shell script I am writing I execute this command: uniq -c names1.tmp > names2.tmp In names2.tmp I get these results: 4 user 2 username 1 users 1 veriano 1 victoria I need to isolate the names in this file and put it in another file. However it seems that the number... (7 Replies)
Discussion started by: mojoman
7 Replies

3. Shell Programming and Scripting

Cut the last field

Hello guys. Is there any way I can cut the last field using "cut" ??? (without putting it into a while...) Thanks. 435 Gavea. (9 Replies)
Discussion started by: 435 Gavea
9 Replies

4. Shell Programming and Scripting

Cut portion of a field in shell scripts

Hi, I am a file with the following layout. field1|field2|field3|field4|field5|field6|field7 field1|field2|field3|field4|field5|field6|field7 field1|field2|field3|field4|field5|field6|field7 I need to write a file with the below layout field1|field2|fieldx|field6 where fieldx =... (5 Replies)
Discussion started by: shivacbz
5 Replies

5. UNIX for Advanced & Expert Users

Printing Field with Delimiter in AWK/cut

Hello, I had posted earlier about printing fields using AWK, but now I have a slightly different problem. I have text files in the format: 1*2,3,4,5 and wish to print the first, third, and fifth fields, including the asterisk and commas. In other words, after filtering it should look... (1 Reply)
Discussion started by: Jahn
1 Replies

6. Shell Programming and Scripting

cut a field, but with reverse order

Hi Everyone, I have one a.txt: a b 001 c b b 002 c c c, not 002 c The output should be 001 002 002 If i use cut -f 3 -d' ', this does not work on the 3rd line, so i thought is any way to cut the field counting from the end? or any perl thing can do this?:confused: ... (3 Replies)
Discussion started by: jimmy_y
3 Replies

7. Shell Programming and Scripting

how to cut a particular field

hi all i am need to cut the name of the file which i am entering in the comand line. say abc.txt is the name of the file i need to cut only the "abc" part. when i try doing this(using cut -f1) i am getting the data that s present inside the file and the file name. pls help.... (3 Replies)
Discussion started by: din_annauniv
3 Replies

8. Shell Programming and Scripting

Cut third field of every third line

Hello, I have got a log file and would need to write a script to cut the every first and second fields of every third line. Job Name : dummytextd_v1 Status : KILLED TIMEDOUT 2011-05-01 05:33 Job Name : dummyttx_v1 Status : KILLED TIMEDOUT 2011-05-03 02:33 Job Name :... (4 Replies)
Discussion started by: Kochappa
4 Replies

9. Shell Programming and Scripting

how to cut the last field without using awk

i have file as with the below content aaa.bbb.cc.dd aaa.fff.bb yyyyy.rrrrr.ggggg.iii wwww.w.r.ty i want the o/p as below dd bb iii ty but i dont want to use awk. is there any other way to do this ? (5 Replies)
Discussion started by: anandgodse
5 Replies

10. UNIX for Beginners Questions & Answers

Cut the first field and the 2 last field

Hello, I would like to cut the first field and the 2 last fields from the string.Please help. Here is the example of the string.DL_FUND_FULL_20190605.txt DL_FUND_HIS_DEL_20190605.txt DL_FUND_HIS_TMP_DEL20190605.txt Please noted that DL_ --> Every files have the prefix like this.... (3 Replies)
Discussion started by: palita2601
3 Replies
cupsd_config_selinux(8) 				    SELinux Policy cupsd_config 				   cupsd_config_selinux(8)

NAME
cupsd_config_selinux - Security Enhanced Linux Policy for the cupsd_config processes DESCRIPTION
Security-Enhanced Linux secures the cupsd_config processes via flexible mandatory access control. The cupsd_config processes execute with the cupsd_config_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 cupsd_config_t ENTRYPOINTS
The cupsd_config_t SELinux type can be entered via the cupsd_config_exec_t file type. The default entrypoint paths for the cupsd_config_t domain are the following: /usr/sbin/hal_lpadmin, /usr/libexec/hal_lpadmin, /usr/bin/cups-config-daemon, /usr/sbin/printconf-backend, /usr/lib/udev/udev-configure- printer, /usr/libexec/cups-pk-helper-mechanism 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 cupsd_config policy is very flexible allowing users to setup their cupsd_config processes in as secure a method as possible. The following process types are defined for cupsd_config: cupsd_config_t Note: semanage permissive -a cupsd_config_t can be used to make the process type cupsd_config_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. cupsd_config policy is extremely flexible and has several booleans that allow you to manipulate the policy and run cupsd_config 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 allow all daemons to write corefiles to /, you must turn on the daemons_dump_core boolean. Disabled by default. setsebool -P daemons_dump_core 1 If you want to enable cluster mode for daemons, you must turn on the daemons_enable_cluster_mode boolean. Enabled by default. setsebool -P daemons_enable_cluster_mode 1 If you want to allow all daemons to use tcp wrappers, you must turn on the daemons_use_tcp_wrapper boolean. Disabled by default. setsebool -P daemons_use_tcp_wrapper 1 If you want to allow all daemons the ability to read/write terminals, you must turn on the daemons_use_tty boolean. Disabled by default. setsebool -P daemons_use_tty 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 NSSWITCH DOMAIN
If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server for the cupsd_config_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 cupsd_config_t, you must turn on the kerberos_enabled boolean. setsebool -P kerberos_enabled 1 MANAGED FILES
The SELinux process type cupsd_config_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. cluster_conf_t /etc/cluster(/.*)? cluster_var_lib_t /var/lib/pcsd(/.*)? /var/lib/cluster(/.*)? /var/lib/openais(/.*)? /var/lib/pengine(/.*)? /var/lib/corosync(/.*)? /usr/lib/heartbeat(/.*)? /var/lib/heartbeat(/.*)? /var/lib/pacemaker(/.*)? cluster_var_run_t /var/run/crm(/.*)? /var/run/cman_.* /var/run/rsctmp(/.*)? /var/run/aisexec.* /var/run/heartbeat(/.*)? /var/run/cpglockd.pid /var/run/corosync.pid /var/run/rgmanager.pid /var/run/cluster/rgmanager.sk cupsd_config_var_run_t /var/run/udev-configure-printer(/.*)? cupsd_etc_t /etc/hp(/.*)? /etc/cups(/.*)? /usr/share/cups(/.*)? cupsd_rw_etc_t /etc/printcap.* /etc/cups/ppd(/.*)? /usr/Brother/(.*/)?inf(/.*)? /usr/Printer/(.*/)?inf(/.*)? /usr/lib/bjlib(/.*)? /var/lib/iscan(/.*)? /var/cache/cups(/.*)? /etc/cups/certs/.* /etc/opt/Brother/(.*/)?inf(/.*)? /etc/cups/lpoptions.* /var/cache/foomatic(/.*)? /etc/cups/cupsd.conf.* /var/lib/cups/certs/.* /opt/gutenprint/ppds(/.*)? /opt/brother/Printers(.*/)?inf(/.*)? /etc/cups/classes.conf.* /etc/cups/printers.conf.* /etc/cups/subscriptions.* /etc/opt/brother/Printers/(.*/)?inf(/.*)? /usr/local/linuxprinter/ppd(/.*)? /var/cache/alchemist/printconf.* /etc/alchemist/namespace/printconf(/.*)? /etc/cups/certs /etc/cups/ppds.dat /var/lib/cups/certs /usr/share/foomatic/db/oldprinterids cupsd_tmp_t print_spool_t /var/spool/lpd(/.*)? /var/spool/cups(/.*)? /var/spool/cups-pdf(/.*)? root_t / /initrd user_tmp_t /var/run/user(/.*)? /tmp/hsperfdata_root /var/tmp/hsperfdata_root /tmp/gconfd-.* FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. You can see the context of a file using the -Z option to ls Policy governs the access confined processes have to these files. SELinux cupsd_config policy is very flexible allowing users to setup their cupsd_config processes in as secure a method as possible. STANDARD FILE CONTEXT SELinux defines the file context types for the cupsd_config, if you wanted to store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk. semanage fcontext -a -t cupsd_config_exec_t '/srv/cupsd_config/content(/.*)?' restorecon -R -v /srv/mycupsd_config_content Note: SELinux often uses regular expressions to specify labels that match multiple files. The following file types are defined for cupsd_config: cupsd_config_exec_t - Set files with the cupsd_config_exec_t type, if you want to transition an executable to the cupsd_config_t domain. Paths: /usr/sbin/hal_lpadmin, /usr/libexec/hal_lpadmin, /usr/bin/cups-config-daemon, /usr/sbin/printconf-backend, /usr/lib/udev/udev-config- ure-printer, /usr/libexec/cups-pk-helper-mechanism cupsd_config_var_run_t - Set files with the cupsd_config_var_run_t type, if you want to store the cupsd config files under the /run or /var/run directory. Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. 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), cupsd_config(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) cupsd_config 14-06-10 cupsd_config_selinux(8)
All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy