Search Results

Search: Posts Made By: hanson44
18,456
Posted By alister
"\|" is an undefined sequence. It looks like an...
"\|" is an undefined sequence. It looks like an escape sequence, but there is no such defined escape sequence in string literals. Some awk string parsers (as the quoted error message makes clear)...
2,193
Posted By Scrutinizer
Note: the "T" command is GNU sed only... Nicely...
Note: the "T" command is GNU sed only...
Nicely done with range repetition..

----
With this adaptation it should also work in regular sed:
sed -e :a -e "s/^\(.\{120,125\}\) /\10/; ta" file
4,247
Posted By Don Cragun
Note that in an ERE, | is a special character and...
Note that in an ERE, | is a special character and does not match a pipe symbol. Even if that wasn't a problem, note that the 2nd grep in this script would not match 100, 026, or 040 even though all...
2,554
Posted By Don Cragun
Sorry, but I must strenuously disagree with your...
Sorry, but I must strenuously disagree with your analysis and your rewrite of the code. If you look at the originally posted script (and my analysis of it in the message #3 in this thread) you will...
5,081
Posted By Peasant
Yep, solaris runs inside Virtualbox as virtual...
Yep, solaris runs inside Virtualbox as virtual machine on Windows host.

Prebuilt machine is just a already installed Solaris for download as a vbox image (you just start it after download), with...
4,205
Posted By alister
Combining both files into a single stream is a...
Combining both files into a single stream is a very clever approach, hanson44. Great idea. However, the implementation needs a bit more work. If the last line of the sorted stream belongs to file1,...
11,778
Posted By alister
Most ps-grep pipelines are underspecified...
Most ps-grep pipelines are underspecified (including all instances in this thread). Consider the following:


The pattern is evidently intended to match only a command name, but then why is it...
1,109
Posted By MadeInGermany
FILENENAME=="file1" { //Instructions executed...
FILENENAME=="file1" {
//Instructions executed for file1
next
}
{
//Instructions executed for file2
}
4,675
Posted By swathi123
Ok awesome reply! Thanks so much for crisp and...
Ok awesome reply! Thanks so much for crisp and clear ans.. Your reply is really appreciated. :b::b::D
1,226
Posted By alister
Hello, hanson44: You can explicitly use the...
Hello, hanson44:

You can explicitly use the match operator:
awk '$0 ~ a, $0 ~ b' a='^START' b='^END' file

When you use /pat1/,/pat2/, that's just shorthand for what my code is doing above....
5,803
Posted By chatguy
SOLVED
Hansen,

You are a genius! At the same time, I never thought it was this easy to do this! Thank you and everyone who chimed in!!

ps: If the word DONE was not previously in the file, the...
6,428
Posted By alister
The simplest solution is probably to use the...
The simplest solution is probably to use the standard cut and paste tools:
cut -d= -f2 file | paste -d, - - -
Regards,
Alister
2,480
Posted By alister
Indeed, that sort command is incorrect. Nice...
Indeed, that sort command is incorrect. Nice catch (and an amusingly ironic one, since I directed you to it to help you fix your sort).

The problem is that attaching a modifier to a key ('r' to...
1,544
Posted By elixir_sinari
The ARG_MAX (or may be LINE_MAX) issue is with ls...
The ARG_MAX (or may be LINE_MAX) issue is with ls temp*.txt and not with xargs.
18,722
Posted By Yoda
Try using awk instead: ps -ef | awk...
Try using awk instead:
ps -ef | awk '/mintty/&&!/awk/{print $2 } '
OR use pgrep
pgrep mintty
7,633
Posted By DGPickett
Since DISK is a constant four, you want to key...
Since DISK is a constant four, you want to key your sort on the first field character 5 and following, numeric ordering. In the the ol day, this was '-n +0.4 -0.99' but now it is -k1.5,1.99n, as...
92,052
Posted By alister
I don't have time at this very moment to consult...
I don't have time at this very moment to consult an implementation's source or run some tests (I might in a few hours), but I would bet that you are wrong about this. The integral type with which...
5,403
Posted By DGPickett
--files-from is -T, see man page link above.
--files-from is -T, see man page link above.
Showing results 1 to 18 of 18

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