Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to grep a number from output line Post 302374015 by chakrapani on Monday 23rd of November 2009 06:53:21 AM
Old 11-23-2009
Java

Quote:
Originally Posted by nitin_aaa27
CFR 235,BBC DM-2 ALL
CFR 111,BBC DM-2 ALL
CFR 333,BBC DM-2 ALL
awk '{ print $2 }' | awk -F, '{ print $1 }' | tr '\n' ','
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

is there any why to get the number of line in grep result ?

Hello all when I do simple grep on file im getting the results of "filename : stringResult " is there any way to present also the line number in the file ? (1 Reply)
Discussion started by: umen
1 Replies

2. UNIX for Dummies Questions & Answers

Get Filename and Line Number using grep

Hi, I am using the Korne shell to try and get the filename, line number and the line of text using grep e.g. find ./ -type f -name "*.java" -exec grep -nf test.txt '{}' \; (test.txt contains strings to search) will return the line number and the line of text. grep -l would return the... (4 Replies)
Discussion started by: ceemh3
4 Replies

3. Shell Programming and Scripting

grep the string with the line number

Dear Masters, Here i have some doubts can anyone clarify?. Is it possible to grep the lines by specifying the line numbers. I know the line number which i want to grep. example: grep 40th line filename grep 50th line filename Need ur comments. (4 Replies)
Discussion started by: salaathi
4 Replies

4. UNIX for Dummies Questions & Answers

How to grep / zgrep to output ONLY the matching filename and line number?

Hi all, I am trying to zgrep / grep list of files so that it displays only the matching filename:line number and does not display the whole line, like: (echo "1.txt";echo "2.txt") | xargs zgrep -no STRING If I use -o option, it displays the matching STRING and if not used, displays the... (3 Replies)
Discussion started by: vvaidyan
3 Replies

5. Shell Programming and Scripting

Using grep to extract line number

I'm trying to use grep to get the line number only. This is the command I'm using: grep -n "Content-Disposition: attachment" mbox The output I get is: 45:Content-Disposition: attachment; filename="test.txt" So now I just want to get the line number (45) from this output. Can someone... (8 Replies)
Discussion started by: mskarica
8 Replies

6. UNIX for Dummies Questions & Answers

Grep or other ways to output line above and/or below searched line

Hi all, Would like to know how I could search for a string 'xyz' but have the output show the line plus the line above and/or below all lines found. eg. search for xyz from file containing: abc 12345 asdf xyz asdfds wwwww kjkjkj ppppp kkkxyz eeee zzzzz and the output to... (2 Replies)
Discussion started by: sammac
2 Replies

7. UNIX for Dummies Questions & Answers

Grep SQL output file for greater than number.

Hi, This is my first post. I have a korn shell script which outputs a select statment to a file. There is only one column and one row which contains a record count of the select statement. The select statement looks something like this: SELECT COUNT(some_field) AS "count_value" ... (2 Replies)
Discussion started by: MurdocUK
2 Replies

8. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

9. UNIX for Beginners Questions & Answers

How do I use grep to grab prime number output from my factor program?

I have a factor program that runs and outputs to stdout all the prime numbers that are specified in the given paramters, in this case 30000000-31000000. Command: factor/factor 30000000-31000000 Sample output: 30999979 = 30999979 30999980 = 2^2 5 11 140909 30999981 = 3 10333327... (6 Replies)
Discussion started by: steezuschrist96
6 Replies

10. UNIX for Beginners Questions & Answers

How to output non-number lines with grep?

I want to check my data quality. I want to output the lines with non-number. I used the grep command: grep '' myfile.csv Since my file is csv file, I don't want to output the lines with comma. And I also don't want to output "." or space. But I still get the lines like the following:... (8 Replies)
Discussion started by: twotwo
8 Replies
BRANDY(1)						      BBC BASIC V interpreter							 BRANDY(1)

NAME
brandy - a portable BBC BASIC V interpreter SYNOPSIS
brandy [-help] [-size SIZE] [-lib FILENAME] [-load FILENAME] [-path DIRECTORY[,DIRECTORY]...] [-quit FILENAME] [-chain FILENAME] [-ignore] [FILENAME] DESCRIPTION
Brandy is an interpreter for BBC BASIC V, the dialect of BASIC that Acorn Computers supplied with their ranges of desktop computers that use the ARM processor such as the Archimedes and Risc PC, and is still in use on these and compatibles. BASIC V is a much extended version of BBC BASIC. This was the BASIC used on the 6502-based BBC Micro that Acorn made during the 1980s. OPTIONS
-help Print a summary of these options. -size SIZE Set the size of the Basic workspace to SIZE bytes when starting the interpreter. The minimum size allowed is 10000 bytes and any- thing below this value will be set to it. The maximum size is limited only by the environment in which the program is being run. The size may have a suffix of k to denote that the size is in kilobytes or m if it is in megabytes. For example, -size 100k will set the workspace size to 100 kilobytes (102400 bytes) and -size 8m will set it to eight megabytes (8388608 bytes). -lib FILENAME Load Basic library FILENAME when the interpreter starts. This option can be repeated as many times as required to load a number of libraries. This is equivalent to typing INSTALL "FILENAME" at the interpreter's command line. The libraries are loaded in the order given on the command line. Note that the search order is the reverse of this. -load FILENAME Load Basic program FILENAME when the interpreter starts. -path DIRECTORY[,DIRECTORY]... This specifies a list of directories that the interpreter will search when looking for libraries and programs. The directory names are separated by commas. The pseudo-variable FILEPATH$ is set to this value. -quit FILENAME Load and run the Basic program FILENAME. Leave the interpreter when the program has finished running. -chain FILENAME Load and run the Basic program FILENAME. Remain in the interpreter when the program has finished running. -graphics Start the interpreter with the screen in graphics mode in versions of the program which support graphics and the screen can be in either text or graphics modes. -ignore Ignore certain `unsupported feature' errors. By default the interpreter reports an error whenever it comes across a BASIC V feature that it does not support. This option allows some unsupported features that do not affect the basic running of the program to be ignored. FILENAME This is exactly equivalent to -chain. The case of the names of the options is ignored. It depends on the operating system under which the interpreter is running as to whether the names of files are case sensitive or insensitive. FILES
brandy executable /usr/share/doc/brandy/examples example BASIC programs SEE ALSO
/usr/share/doc/brandy full documentation Brandy's home page http://jaguar.orpheusweb.co.uk/branpage.html There is some very useful documentation for the BBC Micro available on the Internet. One very good site is The BBC Lives! at: http://www.nvg.ntnu.no/bbc/ or see http://sourceforge.net/projects/brandy/ AUTHOR
David Daniels, with contributions from Darren Salt and Colin Tuckley REPORTING BUGS
Report bugs to the bug tracker at http://sourceforge.net/projects/brandy COPYRIGHT
Copyright (c) 2000, 2001 David Daniels. Copyright (c) 2009, 2012 Colin Tuckley. This is free software; see the source for copying condi- tions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. brandy 1.20pre5 10 Jun 2012 BRANDY(1)
All times are GMT -4. The time now is 01:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy