Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to display first 7 char of grep results? Post 302112833 by ghostdog74 on Friday 30th of March 2007 09:09:47 PM
Old 03-30-2007
Code:
grep  "active=true"  file | cut -d"." -f1

This User Gave Thanks to ghostdog74 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

List grep results

Hi I need to search for matching strings in a database and I want to print out all files that matches in "detail", which means that I want the output to contain datum of last saving. I only get the grep function tp print the actual file names which is not enough since the database is to large... (14 Replies)
Discussion started by: slire
14 Replies

2. Solaris

Top and Prstat display different results for memory

I have a question about the accuracy of prstat. I did a 'prstat -t' and it shows 99% of my memory is occupied by oracle. NPROC USERNAME SIZE RSS MEMORY TIME CPU 194 oracle 343G 340G 99% 86:17.24 56% However, 'top' shows I still have 7762meg of memory free. Memory: 16G real, 7762M... (4 Replies)
Discussion started by: zen03
4 Replies

3. UNIX for Advanced & Expert Users

grep high bit char

Hi - I have file which contains high bit unicode chars like © etc.. How can I do grep to find out lines which contain copyright symbol © I tried using grep \x{00A9} grep \x\{00A9\} Thanks- (7 Replies)
Discussion started by: ayyo1234
7 Replies

4. Shell Programming and Scripting

grep : search a long char contain space

Hi, i have to search for a char like that : export var1="i am not happy /not happy" with a command like : grep $var1 file but this not working with me !!! thank you in advance. (2 Replies)
Discussion started by: tizilfin
2 Replies

5. Shell Programming and Scripting

Display echo results in three column

Dear Friends, I have my command output which displays on one row and values are now scrollable (vertical) 3 pages. How do i display those output in three column so that i no need to scroll? Example: dcadd$cat components 1.Caluculator 2.Diary ... ... 50.Mobile 51.Battery .. ...... (12 Replies)
Discussion started by: baluchen
12 Replies

6. Shell Programming and Scripting

Shell script compare all parameters in two files and display results

Hi , I am not familiar with shell programming. I have a requirement like i have two files .I need to compare the two files by comparing each parameter and i should produce 2 outputs. 1)i have around 35 parameters say i have one parameter name called db_name=dcap in one file and... (7 Replies)
Discussion started by: muraliinfy04
7 Replies

7. Shell Programming and Scripting

Display find results, and pipe to xargs

I have an overnight script which runs across a large directory to repair permissions and ownership. I also have this command output the list of files affected so that cron can email these as a log file. Previously I had the command in the form: find /path/to/files -not -user myname -print -exec... (4 Replies)
Discussion started by: mij
4 Replies

8. Shell Programming and Scripting

Grep no results

Hello guys, I have been looking around but can't find the answer to my problem: If the grep command displays no results, print "no results have been found" and increment x. But if the grep command find something, do nothing. if echo "no results have been found $x" x=`expr $x + 1 `... (3 Replies)
Discussion started by: Benou
3 Replies

9. UNIX and Linux Applications

Display mysql results nicely

Hi, perhaps this is a dumb question. I'm running queries on mysql and I'm getting tabbed results like these: mysql> SELECT * from metrics_status WHERE date = '2012-03-30'; <TABLE... (1 Reply)
Discussion started by: erick_tuk
1 Replies

10. Shell Programming and Scripting

how to display some special results with AWK

I have a file like this: AAEQGAGNQPQH,,,,160,32,,,, AAGQDYNSPLH,,712,39,,,,,, AAGREGGNTEAF,26,,,,,,,,4 AAGSPQH,,,,8,5,,,, AAKKLGQFYNEQF,4,,6,,,7,,,2 AANSGGRYNEQF,,2747,3120,,,,,, AAQGGVGGELF,,,,5,,12,36,, AAQGLAGYYEQY,,25,13,,,,,, AAQRGNEQF,510,2,,,6,,6,,76 AAQTGENSPLH,,16,16,,,,,, The... (9 Replies)
Discussion started by: xshang
9 Replies
GETLIST(1)						      General Commands Manual							GETLIST(1)

NAME
getlist - get a list from an NNTP server SYNOPSIS
getlist [ -h host ] [ list [ pattern [ types ] ] ] DESCRIPTION
The getlist program obtains a list from an NNTP server and sends it to standard output. The list may be one of active, active.times, distributions, or newsgroups. These values request the active(5), active.times, <pathetc in inn.conf>/distributions. or <pathdb in inn.conf>/newsgroups files, respectively. OPTIONS
-h If the ``-h'' flag is used, then the program connects to the server on the specified host. The default is to connect to the server specified in the inn.conf(5) file. If the list parameter is active, then the pattern and types parameters may be used to limit the output. When pattern is used, only active lines with groups that match according to wildmat(3) are printed. When types is also given, only active lines that have a fourth field starting with a character found in types are printed. For example, the following command will obtain the one-line descriptions of all newsgroups found on UUNET: getlist -h news.uu.net newsgroups The following line lists all groups where local postings are permitted, are moderated or aliased: getlist active '*' ym= Note that the listing files other than the active file is a common extension to the NNTP protocol and may not be available on all servers. HISTORY
Written by Landon Curt Noll <chongo@toad.com> for InterNetNews. SEE ALSO
active(5), inn.conf(5), nnrpd(8), wildmat(3). GETLIST(1)
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy