Sponsored Content
Top Forums Shell Programming and Scripting Removing lines of a .csv file Post 302535334 by Scrutinizer on Thursday 30th of June 2011 12:04:29 PM
Old 06-30-2011
Code:
awk -F, \$3 file

This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing lines within a file

Hi There, I've written a script that processes a data file on our system. Basically the script reads a post code from a list file, looks in the data file for the first occurrence (using grep) and reads the line number. It then tails the data file, with the line number just read, and outputs to a... (3 Replies)
Discussion started by: tookers
3 Replies

2. Linux

Removing non printing characters from a csv file

Hi, I have an csv file and there are some non printable characters(extended ascii) so I am trying to create a clean copy of the csv file . I am using this command: tr -cd "" < /opt/informatica/PowerCenter8.6.0/server/infa_shared/SrcFiles/ThirdParty/locations.csv > ... (4 Replies)
Discussion started by: gerkus
4 Replies

3. Shell Programming and Scripting

Removing Lines From a File

Hi Does anybody know of a command that will enable me to remove all entries in a file that have the format (name & time) more testfile anthony 2003 anthonyr 2008 amorel 15:00 anthonyp 14:35 anthonyp 14:35 anthonyr 2008 ardean 13:28 arlene 2003 arlenem 08:15 arlenem 08:15... (5 Replies)
Discussion started by: jamba1
5 Replies

4. Shell Programming and Scripting

removing lines from file

Hi I have many files all with 1 field per line as in 12345 abcde john.paul.net 6789101 how do I remove ceratin lines from these files. Have tried sed but sed wrecks my head! Many thanks in advance for any help (9 Replies)
Discussion started by: rob171171
9 Replies

5. UNIX for Dummies Questions & Answers

removing several lines from a file

Hi folks, I have a long string of DNA sequences, and I need to remove several lines, as well as the line directly following them. For example, here is a sample of my starting material: >548::GY31UMJ02DLYEH rank=0007170 x=1363.5 y=471.0 length=478... (1 Reply)
Discussion started by: kkohl78
1 Replies

6. Shell Programming and Scripting

Removing \n from .csv file

Hi, I have a requirement like my .csv file is generating from a db2 table using export command like below: file format: ----------- 2011 4 0 0 N S C C "BHPC BHPC" 0 0 0 2011 5 0 0 N S C C "BHPC BHPC" 0 0 0 here BHPC is having new line character and because this when i am trying... (4 Replies)
Discussion started by: RRVARMA
4 Replies

7. Shell Programming and Scripting

Bash script help - removing certain rows from .csv file

Hello Everyone, I am trying to find a way to take a .csv file with 7 columns and a ton of rows (over 600,000) and remove the entire row if the cell in forth column is blank. Just to give you a little background on why I am doing this (just in case there is an easier way), I am pulling... (3 Replies)
Discussion started by: MrTuxor
3 Replies

8. Shell Programming and Scripting

Egrep or awk for removing values within CSV file?

Hello, I have a large CSV file that contains values all on the same column, and in one very long row (e.g. no line breaks till end, with all data values separated by a comma). The file has two types of data for the values. One begins with the letters rs and some numbers. The other begins... (4 Replies)
Discussion started by: macurdy
4 Replies

9. UNIX for Beginners Questions & Answers

Removing commas from CSV file

Hi I'm creating a sh script to generate a csv file. The CSV contains the values from a sql table. The content looks this: a,b,c,c2,c3,,,,,,,,,,,d,e I have some code that can separate the fields using the comma as delimiter, but some values actually contain commas, such as... (2 Replies)
Discussion started by: preema
2 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
HASH_EQUALS(3)								 1							    HASH_EQUALS(3)

hash_equals - Timing attack safe string comparison

SYNOPSIS
bool hash_equals (string $known_string, string $user_string) DESCRIPTION
Compares two strings using the same time whether they're equal or not. This function should be used to mitigate timing attacks; for instance, when testing crypt(3) password hashes. PARAMETERS
o $known_string - The string of known length to compare against o $user_string - The user-supplied string RETURN VALUES
Returns TRUE when the two strings are equal, FALSE otherwise. ERRORS
/EXCEPTIONS Emits an E_WARNING message when either of the supplied parameters is not a string. EXAMPLES
Example #1 example <?php $expected = crypt('12345', '$2a$07$usesomesillystringforsalt$'); $correct = crypt('12345', '$2a$07$usesomesillystringforsalt$'); $incorrect = crypt('apple', '$2a$07$usesomesillystringforsalt$'); var_dump(hash_equals($expected, $correct)); var_dump(hash_equals($expected, $incorrect)); ?> The above example will output: bool(true) bool(false) NOTES
Note Both arguments must be of the same length to be compared successfully. When arguments of differing length are supplied, FALSE is returned immediately and the length of the known string may be leaked in case of a timing attack. Note It is important to provide the user-supplied string as the second parameter, rather than the first. PHP Documentation Group HASH_EQUALS(3)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy