Search Results

Search: Posts Made By: WongSifu
1,986
Posted By WongSifu
works!!! thanks!!!
works!!! thanks!!!
1,986
Posted By WongSifu
[Solved] Perl Question - split function with csv file
Hi all,

I have a csv file that appears as follows:

,2013/03/26,2012/12/26,4,1,"2017/09/26,5.75%","2017/09/26,1,2018/09/26,1,2019/09/26,1,2020/09/26,1,2021/09/26,1",,,2012/12/26,now when i use...
1,237
Posted By WongSifu
Thanks elixir!!!
Thanks elixir!!!
1,237
Posted By WongSifu
Perl Pattern Matching Question
Hi all,

I have a pattern matching problem in which i'm not sure how to attack.

Here is my problem:
I have a list of strings that appear in the following format:
String: LE_(1234...
2,154
Posted By WongSifu
Basic Question on perl use POSIX [SOLVED]
Hi guys,

I think this is a basic question. I'm not very familiar with this.

I'm trying to round a number up and round a number down. From what I have read this can be done using POSIX. I have...
1,835
Posted By WongSifu
perl awk system quote probems
Hey guys,

I'm having some issues escaping quotes and getting the following line to run in perl. The quotes are really messing me up.


system (" awk 'BEGIN{FS="/t";OFS=","} {print...
966
Posted By WongSifu
Thanks for the reply. I'm creating my...
Thanks for the reply.

I'm creating my program in Perl, and i can't seem to get the following code to run.

awk 'NR==FNR{A[$1]; next} $1 in A' file1 FS=, file2It looks like it doesn't like the $1...
966
Posted By WongSifu
GREP Problem with Search Values
Hello All,

I'm using the following command:


grep -F -f List.csv Data.csv > Output.csv
List.csv

aa
bb
cc
dd
Data.csv

aa,other stuff
zz,other stuff
bb,other stuff
aa_2,other stuff...
2,981
Posted By WongSifu
Perl - adding columns to file
I have a file in which I need to add more columns to based on a key in the first file:

File1

key1,abc,123,
key2,def,456,
key3,ghi,789,


File2

key2,zyx,111,qqq,
key3,yuu,222,www,...
1,462
Posted By WongSifu
PERL: Declaring Array
Is it possible to declare an array in the following way:


@tmp = (@f[0,47,2,3,4,5,6,7,8,9],"String1","String2", "String3",@f[11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45]);
I'm getting...
1,126
Posted By WongSifu
sorry, I think i had misrepresented my array. ...
sorry, I think i had misrepresented my array.

The array looks like this:


@array = ( "abc,123", "def,456", "ghi,789" )
where abc,123 is the first element.

I would like my output to look...
1,126
Posted By WongSifu
Perl: added to an element
I'm trying to add a string to the end of each element in an array.

I have filled an array using grep:


for ($i = 0; $i <= $#array} - 1; $i++)
{
push (@data,qx(grep...
22,594
Posted By WongSifu
Thanks guys, But I'm not sure if this is...
Thanks guys,

But I'm not sure if this is going to help me. Let me explain my issue a bit more.

I have a list of values and a folder that contains more files than I want to loop through. The...
22,594
Posted By WongSifu
Grep in Perl - Searching through multiple files
I'm attempting to use grep in Perl with very little success.

What I would like to do in Perl is get the output of the following grep code:
grep -l 'pattern' *

This gives me a list of all the...
1,083
Posted By WongSifu
AWK - Different outputs *Question*
I'm having a small issue with AWK:

I run this in PUTTY:
awk 'BEGIN{FS=","}NR==FNR{A[$1]=$1;next}{if (A[$1]==$1) print $0}' FILE1 FILE2 And it gives me the output that I expect.

I wanted to...
1,513
Posted By WongSifu
Thanks birei!!
Thanks birei!!
1,513
Posted By WongSifu
perl array filling *NOOB question*
First time poster here and I'm pretty much a total noob with UNIX and Perl. So please bear with me.

With Perl, I'm trying to fill an array with data that is in a CSV file. I would like to fill...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 10:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy