Search Results

Search: Posts Made By: KenJackson
11,375
Posted By KenJackson
If the server is at a known, fixed IP address,...
If the server is at a known, fixed IP address, you can assign it two names in /etc/hosts like this. Then either name will connect you to the same server. 192.168.1.21 serverA serverB
Then make a...
Forum: What is on Your Mind? 08-14-2011
1,828
Posted By KenJackson
In defense of the command line
Ever since the 80's, I've been appalled at how many people actually think the click-and-wait interface (GUI) is superior to the command line. I suspect that can be explained by most of them never...
2,774
Posted By KenJackson
echo user1 user2 | xargs -n1 id
echo user1 user2 | xargs -n1 id
Forum: What is on Your Mind? 06-17-2011
2,455
Posted By KenJackson
You have a smiley there, and you're almost...
You have a smiley there, and you're almost quoting one of those articles, but I hope you're not saying that tongue in cheek. There's some wisdom in your words. If bitcoins had no value, why would...
Forum: What is on Your Mind? 06-09-2011
2,455
Posted By KenJackson
Bitcoin
I just learned about a new "peer-to-peer currency" named Bitcoin (http://www.weusecoins.com/). It also has a wiki (https://en.bitcoin.it/wiki/Main_Page).

It promises to be a currency that can be...
2,455
Posted By KenJackson
When I tried this, I got the same results as you....
When I tried this, I got the same results as you.
(I don't need -X or -l because of my configuration.)
for x in $(seq 1 10); do ssh <server> xeyes & done
But this works, at least for me.
for x in...
46,750
Posted By KenJackson
I haven't used the MKS toolkit, but here's an...
I haven't used the MKS toolkit, but here's an interesting test that might shed light:
#!/bin/sh
DIR=/tmp/test
rm -rf $DIR; mkdir -p $DIR; cd $DIR || exit 1
touch "ab cd" "ef gh" "ij kl"
...
2,037
Posted By KenJackson
I haven't tried this, but I think you could add...
I haven't tried this, but I think you could add -nc (or --no-clobber) to prevent it from downloading a file if one already exists, and then truncate rather than delete.

You'll end up with a bunch...
1,297
Posted By KenJackson
It looks like you're just using $@.$$$$ very...
It looks like you're just using $@.$$$$ very briefly as a temporary file, whose name doesn't matter.
Why not use a different name that doesn't use dollar signs?

$@.TEMP

Or even the same...
4,428
Posted By KenJackson
This deletes all of the spaces, if any, at the...
This deletes all of the spaces, if any, at the beginning of every line:

sed -e 's/^ *//'

This portion of the same command deletes all the spaces, if any, at the end of every line:

-e 's/...
2,317
Posted By KenJackson
It could also be /etc/profile or even more...
It could also be /etc/profile or even more likely, a file in /etc/profile.d/.

There's a fair chance that the oracle package installed a file, /etc/profile.d/oracle.sh. If it's causing your...
19,164
Posted By KenJackson
I think you're missing a dot. ...
I think you're missing a dot.
netId1=${host1#$SUBNET.}
netId2=${host2#$SUBNET.}
3,939
Posted By KenJackson
I've barely touched sqlite, but if it either -...
I've barely touched sqlite, but if it either
- succeeds and returns 0 or
- makes no change at all and returns an error code
(as I would hope it would), you might try something like this.
while...
1,363
Posted By KenJackson
Unless the target filename has a real dot there.
Unless the target filename has a real dot there.
17,889
Posted By KenJackson
Wow! That's kind of a mess. Those curly brace...
Wow! That's kind of a mess. Those curly brace characters {} don't belong there.

But I do see /usr/bin, and the type command found the executables, after all.

Oh wait! Rereading your original...
2,714
Posted By KenJackson
I can think of a 2-step procedure that should...
I can think of a 2-step procedure that should work, if I understand:
n=1
for f in $(ls -tr obj*x*.bin); do
mv -v "$f" "TEMP$n-${f#obj*-}"
((n++))
done
for f in TEMP*.bin; do
mv -v...
3,592
Posted By KenJackson
You have to decide what format you want for the...
You have to decide what format you want for the timestamp and/or datestamp.

%Y is the 4-digit date,
%H is the (24-hour) hour, etc.

You can see all the format options by executing man date and...
1,798
Posted By KenJackson
Here's my script for printing the local IP. ...
Here's my script for printing the local IP.

I prefer to get the actual address from the network device instead of the address it's supposed to be in /etc/hosts. But some of my machines have the...
Showing results 1 to 18 of 18

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