Search Results

Search: Posts Made By: alister
Forum: BSD 10-02-2013
9,184
Posted By alister
The mmap kernel syscall implementation is in...
The mmap kernel syscall implementation is in src/sys/uvm/uvm_mmap.c and the mmap syscall libc wrapper is in src/lib/libc/sys/mmap.c

Regards,
Alister
3,052
Posted By alister
Hello. My name is Alister and I have a sickness....
Hello. My name is Alister and I have a sickness. Sometimes I can't help but revisit inconsequential, properly functioning commands to make them a tiny bit shorter. :)

awk '{while ($1>=t*w) t++;...
115,742
Posted By alister
I agree with jim. Perhaps it might not be a...
I agree with jim.

Perhaps it might not be a bad idea to include a link to it in any welcome messages/emails sent to new members.

Very nicely done, scottn.

Regards,
Alister
2,359
Posted By alister
Polling the folder and hoping that everything is...
Polling the folder and hoping that everything is done is asking for trouble. If you actually care about not copying over a half-written file, you need an atomic step.

First of all, the directory...
Forum: Ubuntu 05-24-2014
4,013
Posted By alister
Just in case, note that the OP specified...
Just in case, note that the OP specified sendemail, not sendmail. Perhaps it's a typo, but there is such a program and it is available via ubuntu's package repositories.
...
1,733
Posted By alister
If you are using bash, and if there's no...
If you are using bash, and if there's no bash-specific code, try dash or ksh93. Bash isn't an efficient shell.

We can't possibly make any targeted recommendations without knowing something about...
3,265
Posted By alister
If the file uses a tab delimiter and there is...
If the file uses a tab delimiter and there is only 1 per line:
sed 's/\./\t/3; s/\t.*\t/\t/' file
That isn't portable sed, because \t is primarily a GNU extension. However, if it worked for you,...
Forum: Programming 05-23-2014
6,580
Posted By alister
CS and DS do not need a type member. Whenever CS...
CS and DS do not need a type member. Whenever CS and DS are being used directly, the code using them already knows what they are. Only ignorant code inspecting the union needs access to a type flag....
16,747
Posted By alister
echo is usually a shell built-in and not subject...
echo is usually a shell built-in and not subject to that limit.

Regards,
Alister
8,468
Posted By alister
If this task is performed regularly, you should...
If this task is performed regularly, you should consider using a dedicated filesystem. When the time comes to wipe it, instead of rm use mkfs (or newfs, or whatever tool your system uses to create a...
8,893
Posted By alister
AWK's arrays are associative and its subscripts...
AWK's arrays are associative and its subscripts are strings. i does pop into existence, but, in that string context, its undefined value is converted to an empty string.

awk 'BEGIN { a[i]=5; print...
9,403
Posted By alister
Two things. First, the -c option, which...
Two things. First, the -c option, which complements [:alpha:], so what is matched is everything that is not a member of [:alpha:].

Second, \n* must be bracketed. With the brackets, it represents...
2,485
Posted By alister
For a numeric sort, there's no need to remove...
For a numeric sort, there's no need to remove leading zeroes.

Regards,
Alister
Forum: High Performance Computing 05-10-2014
7,698
Posted By alister
Welcome to the forum. Your post is devoid of...
Welcome to the forum.

Your post is devoid of specifics, so don't expect much targeted advice.

Are you using the CPUID instruction to detect AVX? That should work. For the specifics, there are...
9,794
Posted By alister
Nevermind me. I didn't register the "next". ...
Nevermind me. I didn't register the "next".

Regards,
Alister

---------- Post updated at 07:35 PM ---------- Previous update was at 06:59 PM ----------


You are correct in correcting me;...
1,114
Posted By alister
It seems like your friend posted here as well,...
It seems like your friend posted here as well, https://www.unix.com/shell-programming-and-scripting/247112-help-sed-command.html

What a coincidence. For the sake of your projects, you should both...
1,364
Posted By alister
Professor? This should probably have been in the...
Professor? This should probably have been in the homework forum.

Seems a "classmate" has showed up with the same data.

Regards,
Alister
9,794
Posted By alister
After re-reading the OP's previous two posts, I'm...
After re-reading the OP's previous two posts, I'm not certain if I correctly understood the task. If I am mistaken, apologies for the noise.

What I have in mind is the following scenario:

1...
1,992
Posted By alister
As far as I'm concerned, unless you demonstrate...
As far as I'm concerned, unless you demonstrate that you have put forth some effort to solve your own problem, you can continue to wait.

We are here to help, but we are not a free, script-writing...
1,957
Posted By alister
Another, slightly simpler, sed alternative: ...
Another, slightly simpler, sed alternative:

sed 's/.*(//; s/).*//' file
Forum: Red Hat 05-08-2014
4,828
Posted By alister
Even if you set that up correctly, on your...
Even if you set that up correctly, on your system, according to the diagnostic message, mkdir isn't under the /usr hierarchy.

More importantly, as I said, there are multiple errors in your attempt...
9,794
Posted By alister
Since the strings tested aren't regular...
Since the strings tested aren't regular expressions, using the regular expression operator is, at best, unnecessarily expensive. At worst, if the strings are allowed to contain regular expression...
1,363
Posted By alister
You can group them with { ... ; } or ( ... ) or...
You can group them with { ... ; } or ( ... ) or you can use exec.

Regards,
Alister
5,007
Posted By alister
If the following script is problems.sh: ...
If the following script is problems.sh:

mkdir newdir && cd newdir

cat <<EOF > file.txt
*.txt


a b .txt
EOF

echo BEGIN CORRECT SOLUTION
sed 's/\.txt$/_'$(date +%m%Y)'&/' file.txt...
12,643
Posted By alister
If we are going to be precise with regard to...
If we are going to be precise with regard to formal language theory, then you are mistaken. Neither POSIX Basic Regular Expressions, nor the "extended" dialects implemented in perl, python, php,...
Showing results 1 to 25 of 500

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