Search Results

Search: Posts Made By: BSF
1,918
Posted By BSF
Sort csv file
Hello,

I am facing the following problem:
I have a file in csv format. So several records where data fields are separated by comma ','
The lenght of the fields is variable, as well as the...
5,475
Posted By BSF
Hi all, Many thanks for this. It helped me...
Hi all,

Many thanks for this. It helped me a lot.
I had an error message because the command couldn't parse something

So I slightly changed it and it worked out

sed...
5,475
Posted By BSF
Hi Thanks for this. But I was wondering...
Hi

Thanks for this.
But I was wondering whether or not it could be possible to do it without a loop.
I'd like to use an 'awk' or a 'sed'.
My first thought was to use a sed but it works by...
5,475
Posted By BSF
substitute a string on a specific position for specific lines
I woud like to substitue a string on a specific position for specific lines

I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"

For every line (except...
2,574
Posted By BSF
That one is nicer, I will keep it! Thanks.
That one is nicer, I will keep it!
Thanks.
2,574
Posted By BSF
Thanks! I managed to do it the following way...
Thanks! I managed to do it the following way using awk

awk '{str1=substr($0,1,5);str2=substr($0,6,10);str3=substr($0,16,length $0);
gsub(/ /,"",str2);gsub(/-/,"",str2);printf...
2,574
Posted By BSF
Trim and pad a field in the middle of unix file
Hello,

I have a file with several lines and I need to trim and pad with spaces the data that are between position 6 and 15 included. Data in position 1 to 5 and after 15 could be anything, and...
Showing results 1 to 7 of 7

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