Sponsored Content
Full Discussion: print ODD lines
Top Forums Shell Programming and Scripting print ODD lines Post 302467340 by michaelrozar17 on Friday 29th of October 2010 04:23:36 AM
Old 10-29-2010
@birei

Could you pls tel how this works.. 1~2 p
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

print lines AFTER lines cointaining a regexp (or print every first and fourth line)

Hi all, This should be very easy but I can't figure it out... I have a file that looks like this: @SRR057408.1 FW8Y5CK02R652T length=34 AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT +SRR057408.1 FW8Y5CK02R652T length=34 FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8 @SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies

2. Shell Programming and Scripting

odd problem in read lines from file

Hi, I wrote a small program to read lines from a file and count the lines. The program is as below: filename=$1 count=0 cat $filename | while read -r line do printf "%5d:%s\n" $count "$line" count=$((count + 1)) done echo " $count " After I run the program, the result is... (4 Replies)
Discussion started by: jianma
4 Replies

3. Shell Programming and Scripting

How to search for pattern in odd lines?

Hi friends, I am looking for sed command/script that would search for a given fixed pattern on odd lines and then if it matches, prints the matching pattern and the next line. For example, in the example below, i am looking for pattern 0 and 1011 on odd lines. ########## start of example file... (10 Replies)
Discussion started by: kaaliakahn
10 Replies

4. Shell Programming and Scripting

Insert at the beginning of odd lines

Hello people, I am trying with sed to insert some text at the beginning of each odd line of a file but no luck. Can you please help. Awk is also suitable but I am not very familiar with it. Thank you in advance for any help. (7 Replies)
Discussion started by: drbiloukos
7 Replies

5. Shell Programming and Scripting

Sum product of even/odd lines

Hi, I have a text file like this 6.0000E-02 0.00000E+00 0.0000 0.00000E+00 0.0000 7.0000E-02 5.00000E-10 1.0000 5.00000E-10 1.0000 8.0000E-02 3.00000E-09 0.4082 3.00000E-09 0.4082 9.0000E-02 3.50000E-09 0.3780 3.50000E-09 0.3780 1.0000E-01 1.00000E-09... (2 Replies)
Discussion started by: f_o_555
2 Replies

6. Shell Programming and Scripting

awk print odd values

value=$(some command) for all in `echo $value` do awk checks each value (all) to see if it is a odd number. if so, prints the value done sounds easy enough but i've been unable to find anything on google. (2 Replies)
Discussion started by: SkySmart
2 Replies

7. UNIX for Dummies Questions & Answers

Replace character in odd or even lines

Hello, I'm here again asking for your precious help. I'm writing some code to convert csv files to html. I want to highlight header and also I want to have rows with alternate colors. So far this is my work###Let's format first line only with some color cat $fileIN".tmp1" | sed '1... (7 Replies)
Discussion started by: emare
7 Replies

8. Shell Programming and Scripting

Select / Print odd-even elements of an array

Hello experts, I wish to print the contents of odd-even numbered indices of an array. The problem statement is as follows : 1. The first line contains an integer, (the number of test cases). 2. Each line of the subsequent lines containing a string. Example: 2 Haider Bash ... (4 Replies)
Discussion started by: H squared
4 Replies

9. Shell Programming and Scripting

Find to delete lines with pattern and even or odd number

In the below directory I am trying to delete all lines with a .bam extention that have the pattern IonCode_ followed by an even number. I am also trying to delete all lines with a .fastq extention that have the pattern IonCode_ followed by an odd number. I was going to use find but can see all... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. UNIX for Beginners Questions & Answers

awk with sed to combine lines and remove specific odd # pattern from line

In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Discussion started by: cmccabe
4 Replies
NUMFMT_SET_SYMBOL(3)							 1						      NUMFMT_SET_SYMBOL(3)

NumberFormatter::setSymbol - Set a symbol value

	Object oriented style

SYNOPSIS
public bool NumberFormatter::setSymbol (int $attr, string $value) DESCRIPTION
Procedural style bool numfmt_set_symbol (NumberFormatter $fmt, int $attr, string $value) Set a symbol associated with the formatter. The formatter uses symbols to represent the special locale-dependent characters in a number, for example the percent sign. This API is not supported for rule-based formatters. PARAMETERS
o $fmt -NumberFormatter object. o $attr - Symbol specifier, one of the format symbol constants. o $value - Text for the symbol. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 numfmt_set_symbol(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL ); echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo numfmt_format($fmt, 1234567.891234567890000)." "; numfmt_set_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*"); echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo numfmt_format($fmt, 1234567.891234567890000)." "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL ); echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo $fmt->format(1234567.891234567890000)." "; $fmt->setSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*"); echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo $fmt->format(1234567.891234567890000)." "; ?> The above example will output: Sep: . 1.234.567,891 Sep: * 1*234*567,891 SEE ALSO
numfmt_get_error_code(3), numfmt_get_symbol(3). PHP Documentation Group NUMFMT_SET_SYMBOL(3)
All times are GMT -4. The time now is 02:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy