Search Results

Search: Posts Made By: ikki
4,069
Posted By ikki
Hi, is it possible that you have GNU sed...
Hi, is it possible that you have GNU sed installed separately? It often is installed in a different directory, perhaps as gsed, and it supports -i.

And I'll throw perl into the pot:

perl -i.bak...
17,911
Posted By ikki
EDIT: already answered
EDIT: already answered
17,911
Posted By ikki
When dealing with characters, that are not easy...
When dealing with characters, that are not easy to type in an editor, I usually find the "offending" character with od. od can be found on most *nixes, and supports multiple ways to display it's...
12,278
Posted By ikki
If you have gnu grep you can use -H instead of -l...
If you have gnu grep you can use -H instead of -l (might exists on other versions also), which will print the line that matched with the name of file on every line. At least on the AIX I use at work...
1,545
Posted By ikki
On the top of my head, no debugging done, using...
On the top of my head, no debugging done, using bash since I've no idea how to call different programs from awk:

tail -f test.txt | while read D ; do if [ "$D" = "mail this file to me" ] ; then...
3,888
Posted By ikki
Or use my favourite hammer, regex. Assuming $_ is...
Or use my favourite hammer, regex. Assuming $_ is defined:

/([^ ]*) (.*)/ and $hash{$1} = $2;

man perlre
47,380
Posted By ikki
It's not possible with cut, it's designed to work...
It's not possible with cut, it's designed to work with a single character as the field delimeter, that's why awk is propably the better choice here. Other way, if one really wants to use cut or...
47,380
Posted By ikki
I usually prefer perl over any shell script for...
I usually prefer perl over any shell script for this kind of jobs, but I am propably biased since I don't really know awk well enough.

However, here's a simple implementation using bash. It may be...
2,153
Posted By ikki
perlre - perldoc.perl.org...
perlre - perldoc.perl.org (http://perldoc.perl.org/perlre.html)

Each ( ) pair creates a backreference that can later be accessed (until next regex) using $1, $2, $3 ... $n. So, the first...
Forum: OS X (Apple) 06-22-2010
3,050
Posted By ikki
I realize this has already been solved, but for...
I realize this has already been solved, but for future reference: another solutions would have been the basic POSIX tool xargs, shipped with any unix-like os.

It's syntax is very close to the...
47,380
Posted By ikki
So, I pondered your problem a bit. Your task...
So, I pondered your problem a bit. Your task isn't one that requires much processing power, instead the most likely bottleneck is file I/O. If you need to generate this kind of report rarely (say,...
47,380
Posted By ikki
awk is not necessary for this task
If you don't have to use awk, the result you ask for can perhaps be achieved using basic shell tools and sed.

Eg. if the files are called file1, file2 and file3 and have the headers stripped off...
Showing results 1 to 12 of 12

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