Sponsored Content
Operating Systems Solaris Need help capturing end of line numbers Post 302136944 by icalderus on Thursday 20th of September 2007 03:26:09 PM
Old 09-20-2007
Need help capturing end of line numbers

Hello All,

Currently I am attempting to write a script which will capture a number at the end of a line.

The line which I am searching through ends as follows:


word word=number

for example

word word=3

OR

word word=15

I am stuck on how to capture whatever is to the right of the "=" to the end of the line. The number will vary from a single to a double digit number.

Ideally I would like to use this number for further actions downstream.

However currently I am unable to capture this number to the right of the "=" character.


Can someone please input on this? THANKS!!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to total numbers at end of script

I need to total the numbers at the end of script, what code can i use for this to total the lines up? 1232 1242 1234 Total count is 3708 (9 Replies)
Discussion started by: wereyou
9 Replies

2. UNIX for Advanced & Expert Users

Add line numbers to end of each line

Hi i would like to add line numbers to end of each line in a file. I am able to do it in the front of each line using sed, but not able to add at the end of the file. Can anyone suggest The following code adds line number to start of each line sed = filename | sed 'N;s/\n/\t/' how can i... (5 Replies)
Discussion started by: rudoraj
5 Replies

3. Shell Programming and Scripting

Capturing a number at the end of line and store it as variable

Hello, Would someone guide me on how to write a shell script the would search for a phone no using at the end text file using sed or awk and store it in a varaible or print it. The text file is in this form text or numbers in first line text or numbers in second line . . . Firsname... (6 Replies)
Discussion started by: amuthiga
6 Replies

4. Shell Programming and Scripting

Capturing multi-line records containing known value?

Some records in a file look like this, with any number of lines between start and end flags: /Start Some stuff Banana 1 Some more stuff End/ /Start Some stuff End/ /Start Some stuff Some more stuff Banana 2 End/ ...how would I process this file to find records containing the... (8 Replies)
Discussion started by: cs03dmj
8 Replies

5. Shell Programming and Scripting

Adding patterns with increasing numbers at the end of every line

Hi All, I have a file which has some Linux commands in every line like more 456.dat more 3232.dat more 433.dat I want to add texts like this at the end of every line: more 456.dat > 1.txt more 3232.dat > 2.txt more 433.dat > 3.txt So, that the result of more goes into 1.txt... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

6. Shell Programming and Scripting

capturing the value in file before string(*) and the similar value in next line only

I've the output in the file like below. I want to capture the value in file before string(*) and the similar value in next line only. cat test1.txt 0003 Not Visible (M) 0 00 03F 0005 Not Visible (M) 0 00 040 - AVAILABLE 0 00... (1 Reply)
Discussion started by: sai_1712
1 Replies

7. Shell Programming and Scripting

Generate Codes based on start and End values of numbers in a column

Hello All, Could you please help with this. This is what I have: 506234.222 2 506234.222 2 506234.222 2 506234.222 2 508212.200 2 508212.200 2 333456.111 2 333456.111 2 333456.111 2 333456.111 2 But this is what I want: 506234.222 1 506234.222 2 506234.222 2 506234.222 3 (5 Replies)
Discussion started by: canimba
5 Replies

8. Shell Programming and Scripting

Using awk to append incremental numbers to the end of duplicate file names.

I'm currently working on a script that extracts files from a .zip, runs an sha1sum against them and then uses awk to pre-format them into zomething more readable thusly: Z 69 89e013b0d8aa2f9a79fcec4f2d71c6a469222c07 File1 Z 69 6c3aea28ce22b495e68e022a1578204a9de908ed File2 Z 69... (5 Replies)
Discussion started by: Ethereal
5 Replies

9. UNIX for Dummies Questions & Answers

Grep lines with numbers greater than 2 digits at the end of the line

I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file ---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
Discussion started by: jimmyf
1 Replies

10. Shell Programming and Scripting

Searching range of filenames witn and without numbers on the end

So I'm grepping for the following right now: ls -la /somedirectory/*.log* | awk '{print $9}' The problem with this is that I get the following output: /somedirectory/errors_1_foo.log /somedirectory/errors_1_foo.log.1 /somedirectory/errors_1_foo.log.2... (4 Replies)
Discussion started by: LinuxRacr
4 Replies
DICTFMT_INDEX2WORD(1)						Linux User's Manaul					     DICTFMT_INDEX2WORD(1)

NAME
dictfmt_index2word - Creates a .word index file from a DICTD database .index file SYNOPSIS
dictfmt_index2word [OPTIONS] [index_file] DESCRIPTION
dictfmt_index2word creates a word index file on stdout for the index file given on stdin or the command line. A word index file indexes each subword from the multi-word headwords of the .index file, to the underlying .dict file. A word index file is usually named <base- name>.word, but this is not mandatory as long as the proper name is used in the dictd configuration file. OPTIONS
--help displays a usage message and exits --locale locale use locale for sorting the .word file. If this option is omitted, the default locale "C" is used. index_file the .index file to be converted. AUTHOR
dictfmt_index2word was written by Aleksey Cheusov <vle@gmx.net>. This manual page was written by Robert D. Hilliard <hilliard@debian.org>. SEE ALSO
dictd(8), dictfmt(1), dictfmt_index2suffix(1) LINUX
January 23, 2003 DICTFMT_INDEX2WORD(1)
All times are GMT -4. The time now is 01:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy