Sponsored Content
Top Forums Shell Programming and Scripting extracting Number variable and the following digits. Post 302711429 by emily on Saturday 6th of October 2012 08:31:39 AM
Old 10-06-2012
extracting Number variable and the following digits.

HI all,
I have output of something like this:
Code:
  
crab:  ExitCodes Summary
 >>>>>>>>> 12 Jobs with Wrapper Exit Code : 50117 
	 List of jobs: 1-12 
	See https:///twiki/something/ for Exit Code meaning

crab:  ExitCodes Summary
 >>>>>>>>> 5 Jobs with Wrapper Exit Code : 8001 
	 List of jobs: 1-3,7,8 
         See https://twiki/something/ for Exit Code meaning

crab:  ExitCodes Summary
 >>>>>>>>> 3 Jobs with Wrapper Exit Code : 8021 
	 List of jobs: 140,123,342
	See https://twiki/something/ for Exit Code meaning

I would like to recognize the no 50117 ( 8001,8021). And then then digits following this no: 1-12, [which is actually 1,2,3,4,5,6,7,8,9,10,11,12]
Once I have these digits I have to perform some command on these digits.

The no 50117 ( 8001,8021) is important. Reason is depending on this no, the different commands would be performed on the following digits.


Thanks in advance,
emily
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

restrain the number of digits of a PID

How is it possible under UNIX to restrain the number of digits of the PID number? For instance, we have a product that generates a PID of 7 digits, and we would like to have only 6 digits maximum instead for the PID. Thank you for your help. (1 Reply)
Discussion started by: mlefebvr
1 Replies

2. Shell Programming and Scripting

Count number of digits in a word

Hi all Can anybody suggest me, how to get the count of digits in a word I tried WORD=abcd1234 echo $WORD | grep -oE ] | wc -l 4 It works in bash command line, but not in scripts :mad: (12 Replies)
Discussion started by: ./hari.sh
12 Replies

3. Shell Programming and Scripting

Use match() in nawk to find digits in number

Hi, I just need to check whether number of digits in a phone number is 10 or not. If I am not wrong regex will be: {9} I have to use this inside nawk as this is a small portion of a big program. nawk ' BEGIN { RS="";FS=";"; regex="{9}"; } { for (i=1;i<=NF;i++) { if... (6 Replies)
Discussion started by: shekhar2010us
6 Replies

4. Shell Programming and Scripting

number of digits after decimal

Hi All, I have a file of decimal numbers, cat file1.txt 1.1382666907 1.2603107334 1.6118799297 24.4995857056 494.7632588468 560.7633734425 ..... I want to see the output as only 7 digits after decimal (5 Replies)
Discussion started by: senayasma
5 Replies

5. Shell Programming and Scripting

Need to represent a number in 99999999 format(8 digits)

Hi all, i have to create a file having an 8-digit sequence number, that will start by name file_00000001.cvs at first time, the next day the file will be named file_00000002.cvs and so on. How can i do this in my script please, specially that i will need a counter that increments this number... (10 Replies)
Discussion started by: Eman_in_forum
10 Replies

6. Shell Programming and Scripting

summing the digits of a binary nuMBER

please help me write a perl program to find the difference of 1 and zeros of a 6 digit binary number. eg If input is 111100 expected output +2 if input is 000011 expected output -2 input is 000111 expected output 0 (2 Replies)
Discussion started by: dll_fpga
2 Replies

7. Shell Programming and Scripting

Eliminating duplicate lines via specified number of digits

Hello, This is similar to a previous post, where I was trying to eliminate lines where column #1 is duplicated. If it is a duplicate, the line with the greater value in column #2 should be deleted. In this new case, I need to test duplication with the first three digits in column #1 (ignoring the... (6 Replies)
Discussion started by: palex
6 Replies

8. Shell Programming and Scripting

awk changes to cut number of digits

HCPM1ONDB00014800011800000589009211201 L201307022013070228AUD 00000000031. 000965105800000000000000000000000 MOBITV KEYA ... (4 Replies)
Discussion started by: mirwasim
4 Replies

9. Shell Programming and Scripting

Find number of digits in a word

HI, Can you tell me how to find the number of digits in a word. $cat data.txt +123456ad 87645768 Output should be 6 8 (5 Replies)
Discussion started by: ashwin3086
5 Replies

10. Shell Programming and Scripting

Bash detecting number of digits in line

Hi I have a problem, I am attempting to write a bash script that goes through a file and can determine how many characters are at a set point in a line starting with QTY+113:100:PCE, If it detects 3 digits (number in bold) then pad it out with 12 zero's If there are only two digits then pad it... (8 Replies)
Discussion started by: firefox2k2
8 Replies
PLSYAX(3plplot) 						    PLplot API							   PLSYAX(3plplot)

NAME
plsyax - Set y axis parameters SYNOPSIS
plsyax(digmax, digits) DESCRIPTION
Identical to plsxax(3plplot), except that arguments are flags for y axis. See the description of plsxax(3plplot) for more detail. Redacted form: plsyax(digmax, digits) This function is used in examples 1,14,31. ARGUMENTS
digmax (PLINT, input) Variable to set the maximum number of digits for the y axis. If nonzero, the printed label will be switched to a floating point representation when the number of digits exceeds digmax. digits (PLINT, input) Field digits value. Currently, changing its value here has no effect since it is set only by plbox(3plplot) or plbox3(3plplot). However, the user may obtain its value after a call to either of these functions by calling plgyax(3plplot). AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere. SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources. August, 2012 PLSYAX(3plplot)
All times are GMT -4. The time now is 12:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy