Search Results

Search: Posts Made By: 244an
Forum: Ubuntu 12-15-2013
6,255
Posted By 244an
Root access that can't change root password?
We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a...
1,412
Posted By 244an
*solved* Having problem when "making" an executable on FreeBSD
I should make an executable on our server, and are having some problem (I changed this question cause I found out that anser).
I'm getting this error when trying to do make:
In file included...
2,055
Posted By 244an
Thanks, after your explanation it's kind of...
Thanks, after your explanation it's kind of logical, same as in [[ ... ]] -expressions. I also changed in my last post.

I also noticed when I tested this that there is no need to use $ for a_start...
1,900
Posted By 244an
Perhaps there are better ways to solve it, but it...
Perhaps there are better ways to solve it, but it works if you use ctrl-d instead.
Please use code-tags instead, and use indenting in your code for better readability.
2,055
Posted By 244an
Perhaps the posts before has solved your problem?...
Perhaps the posts before has solved your problem?
If not, and if you want to carry on with your solution I think this can get the for-loop to work, it's ugly, but works in bash (FreeBSD):
This ......
3,515
Posted By 244an
Ok, the second condition you should try was...
Ok, the second condition you should try was wrong, should be if [ -z "$num" ]; thenEDIT: I changed the variable names to those from the last posts in the following text:
The script (bash script, you...
966
Posted By 244an
The problem in your first post was missing spaces...
The problem in your first post was missing spaces
if [$S='maintenance'];should be
if [ "$S" = 'maintenance' ];Also adding quotes surrounding $S, if $S is empty it will be an error otherwise.
If...
23,780
Posted By 244an
Not good on FreeBSD 6.2-RELEASE FreeBSD (bash) ...
Not good on FreeBSD 6.2-RELEASE FreeBSD (bash)
Gets
$ openssl rand -hex16
Usage: rand [options] num
where options are
-out file - write to file
-engine e - use engine e,...
3,515
Posted By 244an
Doecho "Enter Value : \c" ; read val echo...
Doecho "Enter Value : \c" ; read val
echo "Enter number: $val\c" ; read num
if [ "$num""X" = "X" ]; then # or use: if [ -z "$tmp" ];... if possible
num="$val"
fi
echo $val
echo $num
2,577
Posted By 244an
Don't know if I understand the problem exactly,...
Don't know if I understand the problem exactly, but this sed maybe solve it:
sed -E 's/([^~]*~){18}3?/&\
/'
3,068
Posted By 244an
Isn't this working? Perhaps it will work...
Isn't this working?

Perhaps it will work with these small adjustments:
#! /bin/sh
if [ -n "$(echo "$1" | egrep "^[0-9]+$")" ]; then
echo "good number: $1"
else
echo "bad number: $1"
fiBe...
2,777
Posted By 244an
$(...) is the same as `...`, I don't know if it's...
$(...) is the same as `...`, I don't know if it's EXACTLY the same, but almost everyone recommend to use $(...)
855
Posted By 244an
Very informative thread :)
Very informative thread :)
2,777
Posted By 244an
Like $RudiC says, there are probably some...
Like $RudiC says, there are probably some characters causing the "error", perhaps a space as the first character in HOSTN?
Change this line in your script to find out if the problem is that:
...
2,161
Posted By 244an
If your question is how to use it with only...
If your question is how to use it with only parameter 2, use this:
./script.sh "" integerAnd I would prefer if [ -z "$1" ]... instead of if [ ! "$1" ]...
3,112
Posted By 244an
I think some of the suggestions posted before...
I think some of the suggestions posted before mine will solve your problem, but if you want to know why var=$(echo $var|tr -d '\n\r')isn't working it's that you must use double quotes: var=$(echo...
1,310
Posted By 244an
@alienrunes...
@alienrunes (https://www.unix.com/members/302126079.html): first you are saving some column from each line in "myarchive.log" into $ARCHIVO (arch.txt), then in the while loop you are doing "sed" for...
9,446
Posted By 244an
I don't have so much to say about using "\" more...
I don't have so much to say about using "\" more than it's an escape for the following newline character, like esacping e.g. "$" with "\$". So perhaps it's important that there is no character (space...
6,263
Posted By 244an
You forgot "$" DATE3=(perl -e...
You forgot "$"
DATE3=(perl -e '@f=localtime(time-(86400*7));printf "%02d%02d%02d\n",$f[5]%100,$f[4]+1,$f[3];')should be
DATE3=$(perl -e '@f=localtime(time-(86400*7));printf...
1,995
Posted By 244an
Yes, the code in the functions are not executed...
Yes, the code in the functions are not executed when declaring them.
6,263
Posted By 244an
Ok. When I read through this thread I get a...
Ok. When I read through this thread I get a feeling that you perhaps haven't tried all different suggestions exactly as they are typed, or?
Please run this command and post exactly the result/error...
1,995
Posted By 244an
As the last line in colors.bash you can call the...
As the last line in colors.bash you can call the function colors.
1,995
Posted By 244an
Yes you can, as long as you don't use "local" for...
Yes you can, as long as you don't use "local" for the variables (and of course if you call "setup" before other uses of the variable).
6,263
Posted By 244an
If you have FreeBSD try date -v-7d...
If you have FreeBSD try
date -v-7d +"%y%m%d"Adjust the format to what you want.
6,263
Posted By 244an
should be: /usr/local/bds/mailsend.s...
should be:

/usr/local/bds/mailsend.s mailx "Backup Default Data File has been used"
<email address> <email address> /export/home/tjmoore/de
fault_data_backup_email 2>&1...
Showing results 1 to 25 of 71

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