Sponsored Content
Top Forums Shell Programming and Scripting Convert rows into columns and create table with awk Post 303024122 by Neo on Sunday 30th of September 2018 10:46:46 PM
Old 09-30-2018
Hi rprpr,

unix.com is not a place where the members do your work for you, regardless of if it is homework, personal or professional work.

We are here to help you do your work, not do your work for you.

Why would you post a "problem" which looks like a typical school question which requires an "urgent reply" saying "it must be awk or any other unix command" without any details of the computer technology available to you and what code you have written or tried so far? Urgent why? Because your teacher told you to have the homework done in two days? Urgent because why? Urgent because you took a computer admin job and have no idea how to create a basic computer program?

Have you ever written a single line of software?

We are not here to beg you to provide basic technology details and we are not here to do you work for you.

So, if you want help, you need to be very technically specific.

Thanks.
This User Gave Thanks to Neo For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

convert rows into columns

Hi guys Could anyone advise me how to convert my rows into columns from a file My file would be similar to this: A11 A12 A13 A14 A15 ... A1n A21 A22 A23 A31 A41 A51 ... Am1 Am2 Am3 Am4 Am5 ... Amn The number of rows is not the same to the number of columns Thanks in advance (2 Replies)
Discussion started by: loperam
2 Replies

2. Shell Programming and Scripting

convert columns into rows

hi, Apologies if this has been covered. I have requirement where i have to convert a single column into multiple column. My data will be like this - 2 3 4 5 6 Output required - 2 3 4 5 6 (1 Reply)
Discussion started by: Nishithinfy
1 Replies

3. Programming

Creating a table like format with rows and columns

I have few files which have two columns in each. like e2 1 1 2694 2 4 2485 3 2 2098 5 1 2079 6 5 2022 9 4 1734 11 5 1585 13 2 1461 18 1 1092 21 2 1019 24 1 915 25 3 907 27 1 891 28 3 890 34 1 748 39 1 700 (1 Reply)
Discussion started by: kamuju
1 Replies

4. UNIX for Dummies Questions & Answers

Convert rows to columns using AWK

Hi , I am struck while coding AWK script. Need your help to convert rows into columns. I should copy only those rows which are marked to Y in a file and ignore N rows. Please help me find a solution. input file 1|abc|Y 2|cdf|Y 3|efg|N 4|xyz|Y my output should be something like this... (2 Replies)
Discussion started by: rashmisb
2 Replies

5. Shell Programming and Scripting

Convert rows into columns using awk or perl

hi friends, i am able to parse cvs diff file using bit of cut and grep commands to produce following output in text file '''cvs-diff.txt''' Package-Name = dev-freetype. Old-Version = 2.4.8 New-Version = 2.4.10 Patches-removed = freetype-2.4.8-cross-compile.patch... (2 Replies)
Discussion started by: alexzander18
2 Replies

6. Shell Programming and Scripting

How to Convert rows in to columns?

Hi Gurus, How to convert rows in to columns using linux shell scripting Input is like (sample.txt) ABC DEF GHI JKL MNO PQR STU VWX YZA BCD output should be (sampleoutput.csv) ABC,DEF,GHI,JKL,MNO PQR,STU,VWX,YZA,BCD (2 Replies)
Discussion started by: infasriniit
2 Replies

7. UNIX for Dummies Questions & Answers

Awk: convert rows to columns every n lines

Hi guys! I use AWK commands under GAMS to predispose the data files to be read by GAMS. I have a file which contains groups of data I need. Unfortunately I have the data spread in 3 rows for each subject. Here's an example (the file is really long) 1 0 2.0956 100.00 250.00 100.00 2.0956... (4 Replies)
Discussion started by: Pintug
4 Replies

8. Shell Programming and Scripting

Convert Rows to Columns

Hi Everyone, Could someone shed some lights on how to convert the records in rows form into column basis. 172.29.59.12 IBM,8255-E8B 102691P 8 65536 MB 6100-04-11-1140 172.29.59.15 IBM,8255-E8B 102698P 4 45056 MB 6100-04-11-1140 IP SYS MODEL ... (6 Replies)
Discussion started by: ckwan
6 Replies

9. Shell Programming and Scripting

Convert rows to columns

I am looking to print the data in columns and after every 3 words it should be a new row. cat example.out | awk 'END { for (i = 0; ++i < m;) print _;print _ }{ _ = _ x ? _ OFS $1 : $1}' m=1| grep -i INNER I am looking to print in a new line after every 3 words. ... (2 Replies)
Discussion started by: lazydev
2 Replies

10. Shell Programming and Scripting

Convert rows to columns

hi folks, I have a sample data like what is shown below: 1,ID=1000 1,Org=CedarparkHospital 1,cn=john 1,sn=doe 1,uid=User001 2,uid=User002 2,ID=2000 2,cn=steve 2,sn=jobs 2,Org=Providence I would like to convert it into the below format: 1,1000,CedarparkHospital,john,doe,User001... (11 Replies)
Discussion started by: vskr72
11 Replies
AssetCacheLocatorUtil(8)				    BSD System Manager's Manual 				  AssetCacheLocatorUtil(8)

NAME
AssetCacheLocatorUtil -- Utility for reporting information about macOS Content Caches SYNOPSIS
AssetCacheLocatorUtil [-j|--json] DESCRIPTION
AssetCacheLocatorUtil reports information related to macOS Content Caches running on the computer or on the local network. Some of the information that AssetCacheLocatorUtil reports depends on the current network configuration, and on the user running it. It might produce different results for different users, on different client devices, or on different networks. Applications that use content caches might choose ones other than the ones AssetCacheLocatorUtil reports due to factors beyond its knowledge, such as iCloud affinity. AssetCacheLocatorUtil reports the following information separately for system daemons and for the current user: Availability hint The system can temporarily save a hint about whether or not there might be content caches on the computer or on the local net- work. AssetCacheLocatorUtil prints that saved hint if it is available. Saved content caches The system can temporarily save information about content caches it has previously found on the computer or on the local net- work. AssetCacheLocatorUtil prints that saved information if it is available. Refreshed content caches AssetCacheLocatorUtil forces the system to search for content caches on the computer and on the local network and to refresh the saved information above. It then prints the results. Public IP address ranges If your network administrator has configured public IP address ranges in DNS, which the system uses when looking up content caches, AssetCacheLocatorUtil prints those ranges. AssetCacheLocatorUtil then reports the reachability status of all of the content caches it found. If the computer cannot communicate with a content cache over the local network then it cannot request files from that content cache. However, just because the computer can "ping" a content cache does not imply that that content cache will serve requests sent from this computer. The --json option prints the results in machine-parseable JSON format to stdout. WARNINGS
AssetCacheLocatorUtil also reports warnings about potential issues it discovers. The Apple cloud service with which content caches register limits the number of content caches on a network. This limit can change at any time. If a larger number of content caches are available on a network than the cloud allows, client devices might not always choose the "best" content cache. AssetCacheLocatorUtil warns when it detects this possibility. The number of content caches available on a network can be reduced by changing the settings of some of the content caches, using System Preferences > Sharing > Content Caching > press the option key > Advanced Options... > Clients > Cache content for:. AssetCacheLocatorUtil also warns when it detects content caches with different ranks. The exact value and meaning of each rank is defined by the Apple cloud service with which content caches register, and can change at any time, but each client device will use only the content caches with the lowest-numbered rank available to it. A content cache's rank can be changed by adjusting its settings, using System Preferences > Sharing > Content Caching > press the option key > Advanced Options... > Clients > Cache content for:. A content cache on the same computer as the client always has the lowest-numbered rank. Having content caches in different ranks can be intentional or accidental, depending on your organization. AssetCacheLocatorUtil warns about mixed ranks in case it is accidental. An example of an intentional use of mixed ranks is when a school has a content cache that caches con- tent for devices using the same local networks and the school's district office has another content cache that caches content for devices using the same public IP address. Client devices in the school will use the school's content cache. Client devices in a different school in the same district will use the district's content cache. Every content cache must have a unique GUID. AssetCacheLocatorUtil warns when it finds content caches in your organization with duplicate GUIDs. A content cache's GUID can be changed by stopping the content cache, running the following command in Terminal as an admin user, and then restarting it: sudo -u _assetcache defaults write /Library/Preferences/com.apple.AssetCache.plist ServerGUID = `uuidgen` Another issue about which AssetCacheLocatorUtil warns is when public IP address ranges are configured but the client device's public IP address is not in the configured ranges. This could prevent the device from using your organization's content caches. To configure custom public IP address ranges use System Preferences > Sharing > Content Caching > press the option key > Advanced Options... > Clients > My local networks: and set DNS TXT records appropriately. SEE ALSO
System Preferences > Sharing > Content Caching, AssetCacheManagerUtil(8) macOS June 1, 2019 macOS
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy