Search Results

Search: Posts Made By: ktm
10,573
Posted By ktm
Create mysql database with bash script - confused
Hi, i have the following:
db="create database xxx;GRANT ALL PRIVILEGES ON xxx.* TO user@localhost IDENTIFIED BY 'password';FLUSH PRIVILEGES;quit;"
mysql -u root -p$mysql_pass -e "$db"

I don't...
3,616
Posted By ktm
Pass parameters to function
Hi, for example I have this function:


function get_param ()
{
test=echo "some string"
test2=echo "someother string"
}


I want to call this function and get test or test2 result, how do I...
Forum: Ubuntu 10-11-2009
11,039
Posted By ktm
logrotate - why ignore size ?
Hi, i have a logroate script that works properly when running manually but otherwise it won't work.I put in in /etc/logrotate.d/nginx. I simply cannot understand why it won't run properly when run...
Forum: Ubuntu 09-11-2009
22,559
Posted By ktm
useradd - shell missing features after adding user
Hi, I need to create a user from a bash script so i have to use useradd. The problem is that when i create a user with:
useradd -d /home/sample -m sample

after i login with that user I have no...
3,591
Posted By ktm
sed -i destroy symlink - how to solve this ?
After a few hours of frustration because I didn't understand why my symlinks are destroyed i just found out that sed -i will destroy symlinks.
I searched but i didn't found any good solution for...
5,074
Posted By ktm
Thank you all, it works now :) .Problem solved,...
Thank you all, it works now :) .Problem solved, great forum and users
5,074
Posted By ktm
Thank you but I think you misunderstood, without...
Thank you but I think you misunderstood, without the domain extension, without .com, .net, .org or other domain extension. it must be something generic because I don't know the domain extension.
The...
5,074
Posted By ktm
Thank you, it works but for different domain...
Thank you, it works but for different domain extensions like .net, .org ..ow do I do it ? I don't know what domain extension would be, it could be .net or aomething else
5,074
Posted By ktm
Unfortunately it doesn't work because I don't...
Unfortunately it doesn't work because I don't know if will be a domain or a subdomain. If the output is:
mydomain.com
dev.mydomain.com

I need to parse each string and strip the domain and...
5,074
Posted By ktm
Parse string
Hi, I need to parse a string, check if there are periods and strip the string.
For example i have the following domains and subdomains: mydomain.com, dev.mydomain.com

I need to strip all periods...
1,949
Posted By ktm
Well I use puttygen from putty-tools on ubuntu. ...
Well I use puttygen from putty-tools on ubuntu.
Is there any way to do what I'm trying or i should give up ?
1,949
Posted By ktm
Copy-paste string automatically
Hi i'm not really sure if it's possible or not in bash. Basically I want to convert a ssh key created with ssh-keygen to putty format. The problem is that puttygen doesn't have an option for...
3,714
Posted By ktm
Thank you both. malcomex999 it worked fine but...
Thank you both.
malcomex999 it worked fine but how to insert list before word "sample" ?
It's not that i don't want to search and try but I didn't find any reference about this, maybe you can point...
3,714
Posted By ktm
Insert content of a file after a certain line in another file
Hi, it's my first post to this forum. I just started bash and I'm stuck at one issue. I want to include content of a file in another file after a certain line. I'm using sed for inserting one line...
Showing results 1 to 14 of 14

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