Search Results

Search: Posts Made By: m1xram
9,104
Posted By m1xram
egrep -q "^$username:" /etc/passwd if [ $? -eq...
egrep -q "^$username:" /etc/passwd
if [ $? -eq 0 ]; then
echo "found"
fi
I don't understand your question about the carat character. '^' can be inserted like any other character. In VI you...
Forum: Programming 03-17-2011
2,110
Posted By m1xram
More information on fflush...
More information on fflush (http://www.elook.org/programming/c/fflush.html)().
128,086
Posted By m1xram
glob vs regex
Chubler,

Nice solution for multiple variable matching. The only thing I'd add would be to note that these are 'glob' matching patterns rather than 'regex' patterns for other readers.
15,287
Posted By m1xram
Tricky
So..

A char is RE ([a-zA-Z][\^\$\~])

A fill is RE [\.,]

Freq = fills / (chars + fills)

Input:
F1 F2 F3 F4 Aa$.c$A..,.$,.,$.^~.
F1 F2 F3 F4 one^~.two.a$threeA$four.five$six
F1 F2 F3 F4...
15,287
Posted By m1xram
instances of delimiters
There are some issues with the match strings you supplied. For one some match strings are substrings of others. If you wanted to know occurrences of ".$" and "." you'd have to look at the count of...
15,287
Posted By m1xram
samples
Always post some sample data. A couple of input lines and then the desired output. So here's a guess....

{
count = split($9, a, "[.,~^]");
printf ("%s %.3f\n", $0, (count - 1) / $8);
...
Forum: Ubuntu 06-03-2010
7,074
Posted By m1xram
cookies and javascript
Ran Wireshark (WS) and found out a couple things.


You must be registered.
It does use cookies.
JavaScript generates a random ID.
Upload file is multipart MIME format.
Intermediate...
3,878
Posted By m1xram
gawk fun
That wasn't much fun. Took me a while to clue into the fact that arrays are associative and not numeric. Sorting was a pain until I made the element name a combo of the the last field and a record...
7,173
Posted By m1xram
with sed
find /usr -type d -name '6*' 2>/dev/null | sed 's/.*\///'
Showing results 1 to 9 of 9

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