Sponsored Content
Top Forums Shell Programming and Scripting to find the number from a line. Post 302321517 by vikings.svnit on Monday 1st of June 2009 11:16:21 AM
Old 06-01-2009
Thanks a lot... I didnt know about the tr command. can you please explain how this works with the parameter -dc.

I can assure you that this is not homework. I am too old to go to school now Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script to find the number of tab delimiters in a line

Hi, I need to find the number of tab delimiters in the first line of a file.So using word=`head -1 files.txt` I have extracted the first line of file into a variable word.It has 20 tab delimted columns.So can anyone help me in finding the number of delimiters? I am using csh and I am a... (5 Replies)
Discussion started by: poornimajayan
5 Replies

2. Shell Programming and Scripting

how to find the line number of a pattern of first appearance??

Hi, I am doin a project in shell script please answer the above question..... waiting........ (2 Replies)
Discussion started by: shivarajM
2 Replies

3. Shell Programming and Scripting

find out line number of matching string using grep

Hi all, I want to display line number for matching string in a file. can anyone please help me. I used grep -n "ABC" file so it displays 6 ABC. But i only want to have line number,i don't want that it should prefix matching context with line number. Actually my original... (10 Replies)
Discussion started by: sarbjit
10 Replies

4. Shell Programming and Scripting

Take each number in table row and find the difference from the corresponding line

I have a two files containing numbers like below. First one contains one number on each line, the other is a table of numbers, each separated by a space. There are the same number of lines in each file. I want to take each number in the row of the table and find the difference from the... (12 Replies)
Discussion started by: kristinu
12 Replies

5. Shell Programming and Scripting

Find line number of bad data in large file

Hi Forum. I was trying to search the following scenario on the forum but was not able to. Let's say that I have a very large file that has some bad data in it (for ex: 0.0015 in the 12th column) and I would like to find the line number and remove that particular line. What's the easiest... (3 Replies)
Discussion started by: pchang
3 Replies

6. Shell Programming and Scripting

How do i find the first number in each line and insert dummy string into the missing columns?

Hi, I have one input file with the following content: MY_inpfile.txt Aname1 Cname1 Cname2 1808 5 Aname2 Cname1 1802 47 Bname1 ? 1819 22 Bname2 Cname1 1784 11 Bname3 1817 9 Zname1 Cname1 1805 59 Zname2 Cname1 Cname2 Cname3 1797 27 Every line in my input file have a 4 digit... (5 Replies)
Discussion started by: Szaffy
5 Replies

7. Shell Programming and Scripting

Find line number

How to find a line number? I have a file: 1 5 8 9 10 15 Is there a simple method to find out on which line for example the 9 is written? (3 Replies)
Discussion started by: jds93
3 Replies

8. Shell Programming and Scripting

How to find line number?

I have a data file (which has five columns) from which im finding column count of all the records and writing into separate file say "colcnt.txt". And I find one (or more) records have less column counts (i.e split records). I need to know which record(s) have that split scenario. Is there any way... (4 Replies)
Discussion started by: Prashanth B
4 Replies

9. Shell Programming and Scripting

awk to find number in a field then print the line and the number

Hi I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field. The source file is pipe delimited and looks something like 1|net|ABC Letr1|1530||| 1|net|EXP_1040 ABC|1121||| 1|net|EXP_TG1224|1122||| 1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies

10. UNIX for Beginners Questions & Answers

How to find encapsulating function name from line number?

I am looking at a log file which just tells me the filename and the line number inside that file that has the Error. What I am interested is knowing the encapsulating function. For example, here are the contents of the log file Error: foo.file on line wxy Error: foo.file... (3 Replies)
Discussion started by: kaaliakahn
3 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:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy