08-03-2007
Resolved, but looks dirty
Thank you for code, matrixmadhan and Shell_life.
But, I simply do that, looks dirty though.
head -1 filename > filename1.csv
awk -F", " '{ if ( $5 >= -300 && $5 <= 300 ) { print } }' filename >> filename1.csv
Cheers,
Jae
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
I have a file with the syntax below (composed of several <log ..... </log> stanzas)
I need to search this file for a number e.g. 2348022225919, and if it is found in a stanza, copy the whole stanza/section (<log .... </log>) to another output file.
The numbers to search for are... (0 Replies)
Discussion started by: aitayemi
0 Replies
2. Shell Programming and Scripting
Hi All,
I have 5000 records like this
Request_id|Type|Status|Priority|Ticket Submitted Date and Time|Actual Resolved Date and Time|Current Ticket Owner Group|Case final Ticket Owner Group|Customer Severity|Reported Symptom/Request|Component|Hot Topic|Reason for Missed SLA|Current Ticket... (2 Replies)
Discussion started by: j_53933
2 Replies
3. Shell Programming and Scripting
I am trying to remove the ita from this file:
"1234ita","john","smith"
"56789ita","jim","thomas"
the command i am using is:
sed '/^ita/d' infile.csv > outfile.csv
it is running but doing nothing, very rarely use sed so trying to learn it any help would be appreciated (2 Replies)
Discussion started by: Pablo_beezo
2 Replies
4. Shell Programming and Scripting
I have a large CSV files (e.g. 2 million records) and am hoping to do one of two things. I have been trying to use awk and sed but am a newbie and can't figure out how to get it to work. Any help you could offer would be greatly appreciated - I'm stuck trying to remove the colon and wildcards in... (6 Replies)
Discussion started by: metronomadic
6 Replies
5. Shell Programming and Scripting
Hi,
I am having 2 servers, Need to delete files from server1 if those files exist in server2 other wise no action using sftp .And the process is non-interactive way. I have got confused how to check the condition in sftp because there is non of the shell condition or loop command is executing.... (2 Replies)
Discussion started by: posix
2 Replies
6. Shell Programming and Scripting
Hi All
A .csv file containing multiple value on it. i need to remove some value from it. Please advise how can i find multiple value from that and remove itself. Please provide solution for this.
Thanks in advance. (4 Replies)
Discussion started by: yash1978
4 Replies
7. Shell Programming and Scripting
Hello
I'd like to remove any line in an output file that is preceded by one or more warning messages (each warning is on a separate line).
Example :
WARNING: Estimation of lower confidence limit of \rho failed; setting it to 0.
822 28447 ... (4 Replies)
Discussion started by: jossojjos
4 Replies
8. Shell Programming and Scripting
I found that the following works to remove the first column in my file when my CSV is delimited with a simple comma:
sed -i 's/*,//' file.csv
However, I have a new file where the fields are encapsulated with double quotes - general example of file:
"Internal ID", "External ID", "Name"... (8 Replies)
Discussion started by: lojkyelo
8 Replies
9. Shell Programming and Scripting
hello...
i have a requirement to convert a xls file to csv in RHEL 6.5 and ftp it to a windows location.
i am using xls2csv utility to convert the file in linux.
Input xls file attached...
I have used below commands to convert the file to csv:
xls2csv -x test.xls -s cp1252 -d 8859-1... (3 Replies)
Discussion started by: rhel65
3 Replies
10. Shell Programming and Scripting
I have a maildir hierarchy of 90k eml files and;
1) I would like to walk the tree and display the first line from any file, whose first line begins with;
From -
That's "From space dash space" and only if it's the first seven characters, of the first line in the file.
2) I would also... (12 Replies)
Discussion started by: jasn
12 Replies