Search Results

Search: Posts Made By: tkg
9,598
Posted By tkg
I figured it out. I had a logic error in the...
I figured it out.
I had a logic error in the partitioning loop that would send one of the branches into an endless loop. :o\ Using '*' instead of '@' worked also, although I don't fully understand...
9,598
Posted By tkg
True enough. The elements. I tried the code...
True enough.

The elements. I tried the code you suggested and I get a "bad substitution" error. The original one I used does populate the "array" variable correctly, however. At least on the...
9,598
Posted By tkg
Yes, I'm using bash. I tried the POSIX version...
Yes, I'm using bash. I tried the POSIX version as well, to see if it made any difference.

$1 should contain the array passed to the function. I found this method searching the web. Is there a...
9,598
Posted By tkg
Recursive function and arrays
I have the following function in a bash script that fails to return the sorted array. I think the problem lies in the recursion not correctly passing the arrays, but I can't tell what I'm doing...
14,490
Posted By tkg
This produces the exact same error I got with my...
This produces the exact same error I got with my original try.


sed: -e expression #1, char 4: unknown command: `/'
14,490
Posted By tkg
This strips the duplicate lines but I had to use...
This strips the duplicate lines but I had to use -r to keep the headers at the beginning.

Thanks
14,490
Posted By tkg
To be more descriptive, I have a csv file that is...
To be more descriptive, I have a csv file that is a compilation of multiple csv files. The first three lines are column headers and I want to delete the duplicates of these lines that are in the...
14,490
Posted By tkg
sed delete pattern skipping first n lines of file.
I have files of more than 10K lines that I need to delete lines that contain a pattern, but I want to keep the first few lines intact. Can this be done with sed?
Showing results 1 to 8 of 8

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