Sponsored Content
Homework and Emergencies Homework & Coursework Questions Displaying specific lines from a CSV file Post 302392538 by Adzi on Thursday 4th of February 2010 05:38:49 PM
Old 02-04-2010
Your a star!

Seriously, I was trying to make it too complicated. All it took was 20-odd lines. I modified it to suit my situation and it works an absolute treat.

Cheers,
Adzi
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Displaying specific lines in a file.

I'm trying to figure out how to display a certain line in a text file. I keep getting references to Tail and Head, and I know how these work, but i'm lost on how to find say the third out of the five lines and display only that. I thought maybe grep could help, but that doesn't seem likely. ... (3 Replies)
Discussion started by: MaestroRage
3 Replies

2. Shell Programming and Scripting

Displaying the Last Modification Time of a specific file

How can I get and display the last modification time of a file? in scripting or specifically using Batch file I want this info for me to determine whether an image has been edited or not by using the last modification time and compare it to our stored date of modification. can somebody help... (5 Replies)
Discussion started by: jaque18
5 Replies

3. UNIX for Dummies Questions & Answers

how to display specific lines of a specific file

are there any basic commands that can display lines 99 - 101 of the /etc/passwd file? I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies

4. Shell Programming and Scripting

Displaying number of lines from file

Hi, I am using below command to display the number of line, but its returning no of lines along with file name. But i want only no of line in the variable p. Please help me on this? p=`wc -l "text file"` echo "$p" (6 Replies)
Discussion started by: shivanete
6 Replies

5. UNIX for Dummies Questions & Answers

Displaying specific columns in a file

Hi, I'm just wondering how you display a specific set of columns of a specified file in Unix. For example, if you had an AddressBook file that stores the Names, Phone numbers, and Addresses of people the user entered in the following format (the numbers are just to give an idea of what column... (1 Reply)
Discussion started by: logorob
1 Replies

6. Shell Programming and Scripting

Displaying lines of a file where the second field matches a pattern

Howdy. I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited? Example: You are... (3 Replies)
Discussion started by: LordJezoX
3 Replies

7. Shell Programming and Scripting

Displaying lines of a file which have the highest number?

Hello Wondering if anybody may be able to advise on how I can filter the contents of the following file: <object_name>-<version> <Instance> GM_GUI_code.fmb-4 1 GM_GUI_code.fmb-5 1 GM_GUI_code.fmx-4 ... (7 Replies)
Discussion started by: Glyn_Mo
7 Replies

8. Shell Programming and Scripting

insert data into specific lines of a CSV

So I work in a 1 to 1 laptop deployment and sometimes we need to mass order parts. The vendor will send us a text file and we have to manually input serial numbers. Well I have a full blown web based inventory system which I can pull serial number reports from. I then have to input the part... (4 Replies)
Discussion started by: tlarkin
4 Replies

9. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

10. UNIX for Beginners Questions & Answers

Convert a horizontal lines to vertical lines in a csv file

Hi.. I need some help in converting the below horizontal lines to vertical lines format. can anyone help me on this. input file Hour,1,2,3,4,5 90RT,106,111,111,112,111 output file Hour,90RT 1,106 2,111 3,111 4,112 5,111 (3 Replies)
Discussion started by: Raghuram717
3 Replies
POW(3)							     Linux Programmer's Manual							    POW(3)

NAME
pow, powf, powl - power functions SYNOPSIS
#include <math.h> double pow(double x, double y); float powf(float x, float y); long double powl(long double x, long double y); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): powf(), powl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L; or cc -std=c99 DESCRIPTION
The pow() function returns the value of x raised to the power of y. RETURN VALUE
On success, these functions return the value of x to the power of y. If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned. If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathemat- ically correct sign. If result underflows, and is not representable, a range error occurs, and 0.0 is returned. Except as specified below, if x or y is a NaN, the result is a NaN. If x is +1, the result is 1.0 (even if y is a NaN). If y is 0, the result is 1.0 (even if x is a NaN). If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0). If x is 0, and y greater than 0 and not an odd integer, the result is +0. If x is -1, and y is positive infinity or negative infinity, the result is 1.0. If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity. If the absolute value of x is greater than 1, and y is negative infinity, the result is +0. If the absolute value of x is less than 1, and y is positive infinity, the result is +0. If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity. If x is negative infinity, and y is an odd integer less than 0, the result is -0. If x is negative infinity, and y less than 0 and not an odd integer, the result is +0. If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity. If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity. If x is positive infinity, and y less than 0, the result is +0. If x is positive infinity, and y greater than 0, the result is positive infinity. If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and HUGE_VAL, HUGE_VALF, or HUGE_VALL, is returned, with the same sign as x. If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs and +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, is returned. ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Domain error: x is negative, and y is a finite noninteger errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised. Pole error: x is zero, and y is negative errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised. Range error: the result overflows errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised. Range error: the result underflows errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised. CONFORMING TO
C99, POSIX.1-2001. The variant returning double also conforms to SVr4, 4.3BSD, C89. BUGS
In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM instead of the POSIX-mandated ERANGE. Since version 2.10, glibc does the right thing. If x is negative, then large negative or positive y values yield a NaN as the function result, with errno set to EDOM, and an invalid (FE_INVALID) floating-point exception. For example, with pow(), one sees this behavior when the absolute value of y is greater than about 9.223373e18. In version 2.3.2 and earlier, when an overflow or underflow error occurs, glibc's pow() generates a bogus invalid floating-point exception (FE_INVALID) in addition to the overflow or underflow exception. SEE ALSO
cbrt(3), cpow(3), sqrt(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2010-09-12 POW(3)
All times are GMT -4. The time now is 10:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy