Sponsored Content
Top Forums Shell Programming and Scripting How to convert a single column into several columns? Post 302528046 by pinpe on Monday 6th of June 2011 10:35:23 AM
Old 06-06-2011
Hi getmmg,

Can you please use the input file below. So instead of letter you will use numbers.

Code:
389    
57     
4      
29     
51     
382    
527    
10625  
87868  
18     
5      
1807367
8614   
730    
7025

The output should be like this...

Code:
389     382       5      
57      527       1807367
4       10625     8614   
29      87868     730    
51      18        7025

Thanks in advance.



Br,
Pinpe
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

single column to multiple columns

Hello, I have a single column of data that I would like to cut/print (with awk or ...) into multiple columns at every empty row (or common character). Input: 5.99123 5.94693 7.21383 5.95202 0.907935 5.99149 6.08427 0.975774 6.077 Output: 5.99123 5.95202 6.08427 5.94693... (7 Replies)
Discussion started by: agibbs
7 Replies

2. Shell Programming and Scripting

Single column to multiple columns in awk

Hi - I'm new to the awk programming language. I'm trying to print a single column of data to several columns, and I found an article on iTWorld.com (ITworld.com - Printing in columns). It looks like the mkCols2 script is very close to what I need to do, but it looks like the end of the code... (2 Replies)
Discussion started by: astroDave
2 Replies

3. UNIX for Dummies Questions & Answers

How to convert a single column into several rows and columns?

I have a program which gives me the output as a single column with hundreds of rows like: 213 314 324 324 123 I want to be able to create a new file from this file which allows me to set the number of rows and columns in the new file, i.e. for this example, if I specify 3 rows and 2... (5 Replies)
Discussion started by: ashton_smith
5 Replies

4. Shell Programming and Scripting

Convert two column data into 8 columns

Apologies if this has been covered - I did search but couldn't find what I was looking for. I have a simple X-Y input file. I want to convert it from two columns into 8 columns - 4 pairs of X-Y data. So my input file looks like X1 Y1 X2 Y2 X3 Y3 X4 Y4 X5 Y5 etc And I want it to look... (8 Replies)
Discussion started by: NickC
8 Replies

5. Shell Programming and Scripting

how to introduce a space in a single column without distrubing the other columns

Hello Experts, I am new to this forum, I would like to do the following changes in one of the column of a txt file, which is having around 9 column. For example, column 3 is having letters like this AB11 AB12 C CA CB AC1 AC2 I would like to convert the same column as follows ... (5 Replies)
Discussion started by: Fredrick
5 Replies

6. Shell Programming and Scripting

Convert columns to single row

Hello all I have data like 1 2 3 4 5 I wish my output would be like 1,2,3,4,5 For this i have executed 'BEGIN {FS="\n"; ORS=","} {print $0}' test and got the output as 1,2,3,4,5, I do not want to have , at the end of 5. output should be like (5 Replies)
Discussion started by: vasuarjula
5 Replies

7. Shell Programming and Scripting

convert columns into rows with respect to first column

Hello All, Please help me with this file. My input file (Tab separated) is like: Abc-01 pc1 -0.69 Abc-01 E2cR 0.459666666666667 Abc-01 5ez.2 1.2265625 Xyz-01 pc1 -0.153 Xyz-01 E2cR 1.7358 Xyz-01 5ez.2 2.0254 Ced-02 pc1 -0.5714 Ced-02 ... (7 Replies)
Discussion started by: mira
7 Replies

8. Shell Programming and Scripting

Multiple columns to a single column

I have this input: 10 22 1 100 11 22 10 1 50 14 3 1 100 23 3 1 100 24 15 1 100 10 22 5 3 1 33.333 11 22 1 100 It has an inconsistent number of fields but the last field is determined by 100/(NF-2) using awk. I want to take this multiple columned input file and transform so that... (2 Replies)
Discussion started by: mdlloyd7
2 Replies

9. Shell Programming and Scripting

Convert single column into multiple rows

Convert Single column to multiple rows file a.txt contains data like below Server=abc Run=1 Tables=10 Sessions=16 Time=380 Jobs=5 Server=abc Run=2 Tables=15 Sessions=16 Time=400 Jobs=5 Server=abc Run=3 Tables=20 Sessions=16 Time=450 (5 Replies)
Discussion started by: sol_nov
5 Replies

10. Shell Programming and Scripting

Convert row to columns start from nth column

Dear All, We have input like this: 161 57 1378 176 1392 262 1444 441 1548 538 1611 670 1684 241 57 1378 208 1393 269 1447 444 1549 538 1610 677 1700 321 ... (4 Replies)
Discussion started by: attila
4 Replies
xguest_selinux(8)					xguest SELinux Policy documentation					 xguest_selinux(8)

NAME
xguest_u - Least privledge xwindows user role. - Security Enhanced Linux Policy DESCRIPTION
xguest_u is an SELinux User defined in the SELinux policy. SELinux users have default roles, xguest_r. The default role has a default type, xguest_t, associated with it. The SELinux user will usually login to a system with a context that looks like: xguest_u:xguest_r:xguest_t:s0 Linux users are automatically assigned an SELinux users at login. Login programs use the SELinux User to assign initial context to the user's shell. SELinux policy uses the context to control the user's access. By default all users are assigned to the SELinux user via the __default__ flag On Targeted policy systems the __default__ user is assigned to the unconfined_u SELinux user. You can list all Linux User to SELinux user mapping using: semanage login -l If you wanted to change the default user mapping to use the xguest_u user, you would execute: semanage login -m -s xguest_u __default__ If you want to map the one Linux user (joe) to the SELinux user xguest, you would execute: $ semanage login -a -s xguest_u joe USER DESCRIPTION
The SELinux user xguest_u is defined in policy as a unprivileged user. SELinux prevents unprivileged users from doing administration tasks without transitioning to a different role. SUDO
X WINDOWS LOGIN
The SELinux user xguest_u is able to X Windows login. NETWORK
The SELinux user xguest_u is able to listen on the following tcp ports. all ports with out defined types 32768-61000 The SELinux user xguest_u is able to connect to the following tcp ports. 8955 53 111 32768-61000 8000,9433,16001 843,1935 9080 all ports < 1024 all ports with out defined types 389,636,3268,7389 88,750,4444 631,8610-8614 8081 8036 8080,8118,8123,10001-10010 80,81,443,488,8008,8009,8443,9000 21,989,990 4331,5001 4713 3128,3401,4827 The SELinux user xguest_u is able to listen on the following udp ports. all ports with out defined types 32768-61000 The SELinux user xguest_u is able to connect to the following tcp ports. 8955 53 111 32768-61000 8000,9433,16001 843,1935 9080 all ports < 1024 all ports with out defined types 389,636,3268,7389 88,750,4444 631,8610-8614 8081 8036 8080,8118,8123,10001-10010 80,81,443,488,8008,8009,8443,9000 21,989,990 4331,5001 4713 3128,3401,4827 BOOLEANS
SELinux policy is customizable based on least access required. xguest policy is extremely flexible and has several booleans that allow you to manipulate the policy and run xguest with the tightest access possible. If you want to allow xguest users to configure Network Manager and connect to apache ports, you must turn on the xguest_connect_network boolean. Enabled by default. setsebool -P xguest_connect_network 1 If you want to allow xguest users to mount removable media, you must turn on the xguest_mount_media boolean. Enabled by default. setsebool -P xguest_mount_media 1 If you want to allow xguest to use blue tooth devices, you must turn on the xguest_use_bluetooth boolean. Enabled by default. setsebool -P xguest_use_bluetooth 1 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 user domains applications to map a memory region as both executable and writable, this is dangerous and the executable should be reported in bugzilla, you must turn on the deny_execmem boolean. Enabled by default. setsebool -P deny_execmem 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 httpd cgi support, you must turn on the httpd_enable_cgi boolean. Enabled by default. setsebool -P httpd_enable_cgi 1 If you want to unify HTTPD handling of all content files, you must turn on the httpd_unified boolean. Disabled by default. setsebool -P httpd_unified 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 logging in and using the system from /dev/console, you must turn on the login_console_enabled boolean. Enabled by default. setsebool -P login_console_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 disallow programs, such as newrole, from transitioning to administrative user domains, you must turn on the secure_mode boolean. Enabled by default. setsebool -P secure_mode 1 If you want to allow regular users direct dri device access, you must turn on the selinuxuser_direct_dri_enabled boolean. Enabled by default. setsebool -P selinuxuser_direct_dri_enabled 1 If you want to allow unconfined executables to make their stack executable. This should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla, you must turn on the selin- uxuser_execstack boolean. Enabled by default. setsebool -P selinuxuser_execstack 1 If you want to allow user to r/w files on filesystems that do not have extended attributes (FAT, CDROM, FLOPPY), you must turn on the selinuxuser_rw_noexattrfile boolean. Disabled by default. setsebool -P selinuxuser_rw_noexattrfile 1 If you want to allow user to use ssh chroot environment, you must turn on the selinuxuser_use_ssh_chroot boolean. Disabled by default. setsebool -P selinuxuser_use_ssh_chroot 1 If you want to allow ssh logins as sysadm_r:sysadm_t, you must turn on the ssh_sysadm_login boolean. Disabled by default. setsebool -P ssh_sysadm_login 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 If you want to allow the graphical login program to login directly as sysadm_r:sysadm_t, you must turn on the xdm_sysadm_login boolean. Enabled by default. setsebool -P xdm_sysadm_login 1 If you want to allows clients to write to the X server shared memory segments, you must turn on the xserver_clients_write_xshm boolean. Disabled by default. setsebool -P xserver_clients_write_xshm 1 If you want to support X userspace object manager, you must turn on the xserver_object_manager boolean. Enabled by default. setsebool -P xserver_object_manager 1 HOME_EXEC The SELinux user xguest_u is able execute home content files. TRANSITIONS
Three things can happen when xguest_t attempts to execute a program. 1. SELinux Policy can deny xguest_t from executing the program. 2. SELinux Policy can allow xguest_t to execute the program in the current user type. Execute the following to see the types that the SELinux user xguest_t can execute without transitioning: search -A -s xguest_t -c file -p execute_no_trans 3. SELinux can allow xguest_t to execute the program and transition to a new type. Execute the following to see the types that the SELinux user xguest_t can execute and transition: $ search -A -s xguest_t -c process -p transition MANAGED FILES
The SELinux process type xguest_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. anon_inodefs_t auth_cache_t /var/cache/coolkey(/.*)? chrome_sandbox_tmpfs_t cifs_t httpd_user_content_t /home/[^/]*/((www)|(web)|(public_html))(/.+)? httpd_user_htaccess_t /home/[^/]*/((www)|(web)|(public_html))(/.*)?/.htaccess httpd_user_ra_content_t /home/[^/]*/((www)|(web)|(public_html))(/.*)?/logs(/.*)? httpd_user_rw_content_t httpd_user_script_exec_t /home/[^/]*/((www)|(web)|(public_html))/cgi-bin(/.+)? noxattrfs all files on file systems which do not support extended attributes usbfs_t user_fonts_cache_t /root/.fontconfig(/.*)? /root/.fonts/auto(/.*)? /root/.fonts.cache-.* /home/[^/]*/.fontconfig(/.*)? /home/[^/]*/.fonts/auto(/.*)? /home/[^/]*/.fonts.cache-.* user_home_type all user home files user_tmp_type all user tmp files user_tmpfs_type all user content in tmpfs file systems xdm_tmp_t /tmp/.X11-unix(/.*)? /tmp/.ICE-unix(/.*)? /tmp/.X0-lock xserver_tmpfs_t 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), xguest(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8), xguest_dbusd_selinux(8), xguest_dbusd_selinux(8), xguest_gkeyringd_selinux(8), xguest_gkeyringd_selinux(8) mgrepl@redhat.com xguest xguest_selinux(8)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy