Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.08 seconds.
Search: Posts Made By: frans
Forum: Ubuntu Linux 10-15-2012
Replies: 2
Views: 1,862
Posted By frans
Why use samba to connect from a Linux distro to...

Why use samba to connect from a Linux distro to another? You can have better performance/security with ssh.
Forum: Ubuntu Linux 09-11-2012
Replies: 2
Views: 4,904
Posted By frans
That's just a function declaration but doesn't...

That's just a function declaration but doesn't create a new PID.
Maybe you would use subprocesses :
( # do your
things
)
It would be easier for us if you explaned a bit more what you want...
Forum: Ubuntu Linux 11-18-2011
Replies: 1
Views: 1,555
Posted By frans
But that shouldn't ma the program crash, so it's...

But that shouldn't ma the program crash, so it's a bug (not major) which can be reported to the ubuntu team.
Forum: Shell Programming and Scripting Linux 07-04-2011
Replies: 4
Views: 2,862
Posted By frans
You are the owner of the file but you are not the...

You are the owner of the file but you are not the new owner if chown.
Therefore tou must be root.
Forum: Shell Programming and Scripting Linux 05-22-2011
Replies: 4
Views: 2,632
Posted By frans
It's onlyecho $(date -u +%W)$(uname) | sha256sum...

It's onlyecho $(date -u +%W)$(uname) | sha256sum | sed 's/\W//g'that you should copy in the terminal
Forum: Shell Programming and Scripting Linux 05-22-2011
Replies: 4
Views: 2,632
Posted By frans
Type or copy/paste the command line in a...

Type or copy/paste the command line in a terminal, it will give you the answer ;)
Forum: Shell Programming and Scripting Linux 05-14-2011
Replies: 5
Views: 1,567
Posted By frans
Please use code tags for file_name in *\ * do...

Please use code tags
for file_name in *\ *
do
test.sh "$file_name"
done
Forum: Shell Programming and Scripting Linux 05-13-2011
Replies: 2
Views: 2,121
Posted By frans
If they must be exactly the same ...

If they must be exactly the same
systime=2011-05-13:18:45
shubtime=2011-05-13:18:30
if [ "$systime" = "$shubtime" ]
then
echo" OK"
else
echo "NOK"
fi
Or shorter:[ "$systime" =...
Forum: Shell Programming and Scripting Linux 05-12-2011
Replies: 8
Views: 837
Posted By frans
'-' can not be in a variable name. Please, tell...

'-' can not be in a variable name. Please, tell us what you want to do with it, maybe there's a turnaround.
Forum: Shell Programming and Scripting Linux 05-12-2011
Replies: 8
Views: 837
Posted By frans
Right. I should have seen that !

Right. I should have seen that !
Forum: Shell Programming and Scripting Linux 05-12-2011
Replies: 3
Views: 791
Posted By frans
while condition; do ... doneand your...

while condition; do
...
doneand your double quotes look strange...

if looptrack = 'y' then looptrack != '1' !!! because 'y' != '1'
Forum: Shell Programming and Scripting Linux 05-12-2011
Replies: 8
Views: 837
Posted By frans
one-$i ="/tmp/one.$RANDOM" Won't work ...

one-$i ="/tmp/one.$RANDOM" Won't work


use eval
no space around '='

eval "one-$i=/tmp/one.$RANDOM"
Forum: Shell Programming and Scripting Linux 05-06-2011
Replies: 3
Views: 829
Posted By frans
Use read while true; do read -p "Enter a...

Use read
while true; do
read -p "Enter a number (leave blank to finish) : " N
[ -z "$N" ] && break
((Total+=N))
done
echo "Sum of entered numbers : $Total"
exit 0
NOTE: There isn't...
Forum: Shell Programming and Scripting Linux 05-02-2011
Replies: 10
Views: 6,667
Posted By frans
Check pgrep...

Check pgrep (https://www.unix.com/man-page/All/1/pgrep/)
Forum: Shell Programming and Scripting Linux 05-02-2011
Replies: 2
Views: 533
Posted By frans
Please use code tags for code. Indent your...

Please use code tags for code.
Indent your code so it is readable.

I have indented and used the [highlight=shell] so that it is nicely coloured:
a=0;
while [ $a -eq 0 ] # Needs SPACE there...
Forum: Shell Programming and Scripting Linux 05-02-2011
Replies: 1
Views: 1,248
Posted By frans
You can also use pgrep...

You can also use pgrep (https://www.unix.com/man-page/All/1/pgrep/)
Forum: Shell Programming and Scripting Linux 05-02-2011
Replies: 1
Views: 902
Posted By frans
There is an environmental variable called $HOME...

There is an environmental variable called $HOME which gives the home directory of the currently logged user. Try echo $HOME
Another shortcut is the tilde '~' which refers to the user's home...
Forum: Shell Programming and Scripting Linux 04-25-2011
Replies: 4
Views: 16,819
Posted By frans
Those are not valid timestamps, but here's the...

Those are not valid timestamps, but here's the "script": (works with GNU date)
while read S; do date -d @$S; done <infile
Forum: Shell Programming and Scripting Linux 04-17-2011
Replies: 3
Views: 1,025
Posted By frans
1. There's no need of ls Supposing you have...

1. There's no need of ls
Supposing you have a.txt and b.txt un current directory : in for i in ls * will expand to ls
a.txt
b.txtYou could simply write for i in *
Forum: Shell Programming and Scripting Linux 04-17-2011
Replies: 3
Views: 5,784
Posted By frans
#!/bin/bash ##!/bin/bash var2="bgroup = set...

#!/bin/bash
##!/bin/bash
var2="bgroup = set bgroup port"
var3="utm = set security utm"
echo "$var2 --> '${var2# = }'"
echo "$var3 --> '${var3# = }'"
# You can also
for V in var2 var3; do
...
Forum: Shell Programming and Scripting Linux 04-11-2011
Replies: 14
Views: 11,013
Posted By frans
OMG :( I'll correct the original post. Thanks

OMG :(
I'll correct the original post.
Thanks
Forum: Shell Programming and Scripting Linux 04-11-2011
Replies: 14
Views: 11,013
Posted By frans
Only if netmask is 255.255.255.0 (24 bits) ...

Only if netmask is 255.255.255.0 (24 bits)
#!/bin/bash
read -p "Enter beginning IP-addres: " host1
read -p "Enter ending IP-addres: " host2
SUBNET=${host1%.*}
netId1=${host1#$SUBNET.}...
Forum: Ubuntu Linux 04-11-2011
Replies: 5
Views: 1,555
Posted By frans
Why 9.04 and not 10.4 LTS (long time support) or...

Why 9.04 and not 10.4 LTS (long time support) or the most recent one ?
Forum: Shell Programming and Scripting Linux 04-10-2011
Replies: 14
Views: 11,013
Posted By frans
Yhat's why you can use the IP command to get...

Yhat's why you can use the IP command to get information about address - mask, i.e:ip addr show eth0returns me
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen...
Forum: Shell Programming and Scripting Linux 04-09-2011
Replies: 14
Views: 11,013
Posted By frans
netmask (utility of the Debian project) can be...

netmask (utility of the Debian project) can be useful~$ netmask -r 192.168.100.6/24
192.168.100.0-192.168.100.255 (256)
perts of the the man page:
SYNOPSIS
netmask [ options ] spec [ spec...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 01:44 AM.