Search Results

Search: Posts Made By: ankimo
9,372
Posted By ankimo
I'd like to piggy-back onto this post and ask,...
I'd like to piggy-back onto this post and ask, how do I read everything in between "start" and "end" so that "start" and "end" are not included in the extraction?

I recognize that I can use...
5,715
Posted By ankimo
sorry about that and thanks for your response...
sorry about that and thanks for your response Franklin52.

i have a script that has this syntax: script <group_id> <user_name> <regex>

rules:
* the user can enter single or multiple group_ids...
5,715
Posted By ankimo
since i'm still at the top of the list, i thought...
since i'm still at the top of the list, i thought i would add that i'm using ksh.

thanks for your help.
5,715
Posted By ankimo
testing for regex at command line
hi unixers,

i wonder if someone can tell me how i can check for a regex at the command line?


if any parameter begins with a special character then
do this
else
do thatthanks for...
1,409
Posted By ankimo
thanks, pistachio! much simpler code. i had...
thanks, pistachio! much simpler code.

i had to tweak it slightly by adding a semi-colon:

for i in `cat user_list`; do echo "'"$i"'," >> formatted_user_list; donebut it still doesn't answer my...
1,409
Posted By ankimo
formatting differently in last loop
hi. i'm trying to create a list users that is formatted for an SQL query. it should take the form:

'user1',
'user2',
'user3'as you can see, there is no comma after the last value. could...
1,530
Posted By ankimo
compressing code onto one line
hi,

i am trying to rewrite some of my code onto one line. but it's not working.

what's happening is that the program exits and doesn't execute any of the code that follows.

did i make...
Forum: UNIX and Linux Applications 10-01-2008
3,376
Posted By ankimo
for the other newbies, i made some dumb mistakes....
for the other newbies, i made some dumb mistakes. the biggest was that i shouldn't have had a ; after quit. i think this is better:

while read user; do

userid=$user
passwd="changeme"...
Forum: UNIX and Linux Applications 10-01-2008
3,376
Posted By ankimo
i thought about this some more and wonder if this...
i thought about this some more and wonder if this is a smarter solution. it seems closer, but i'd still love feedback if there is a better way:

while read user; do

userid=$user
...
Forum: UNIX and Linux Applications 10-01-2008
3,376
Posted By ankimo
grant usage to users listed in a file
hi,

i'm trying to grant usage to multiple users whose ids are in a file. i thought that i could put the mysql code within a while loop, but that's not working for me:


while read user; do
...
7,194
Posted By ankimo
for loop logic with multiple parameters
hi, unix wizards,

i have a question about the logic of my inner for loop below. first, what i am trying to do is to write a script called create_account that automatically creates mysql...
20,813
Posted By ankimo
brackets vs parentheses - single and double
hi, unix gurus.

i am wondering if someone can give me a clear explanation of the differneces between parentheses and brackets, both single and double.


i have heard that double...
1,785
Posted By ankimo
that is sweet! thanks a lot.
that is sweet! thanks a lot.
1,785
Posted By ankimo
parsing variable contents with comma delimter
hi, unix gurus.

i am trying to read a file that has records in this format...

x<group_id>:::<member1a>,<member1b>,<member1c>
x<group_id>:::<member2a>,<member2b>,<member2c>

... and to put...
22,205
Posted By ankimo
fantastic. thanks for your help.
fantastic. thanks for your help.
22,205
Posted By ankimo
single line if statement
hi, i wonder if someone could tell me how to properly convert the following code onto one line:


if [ ! -f ./some_file ]
then
print "The file was not copied"
exit 1
fi


i...
66,359
Posted By ankimo
thanks for your response! do you mean something...
thanks for your response! do you mean something like this? it's not quite working for me. i'm pretty new at this. :o


if [ $# == 3 ]; then
QUERY = "$QUERY update user set...
66,359
Posted By ankimo
hi again. maybe i should add that i...
hi again.

maybe i should add that i understand this much:

if [ -n "$1" ]; then

but i'm unclear on how to check for multiple parameters. i've tried different things, searched through...
66,359
Posted By ankimo
ksh: verifying number of parameters passed
hi all,

i have a ksh script that takes up to 3 parameters -- only 2 of which are required. what's the simplest way to check if the user passed 2 or 3 parameters?

if 3 parameters are not...
Forum: UNIX and Linux Applications 09-16-2008
6,066
Posted By ankimo
set mysql password with host parameter
hi, linux gurus...

i'm trying to write a script in ksh called ResetPass that allows a user to change mysql passwords. the script accepts user, password and host like this: ResetPass <user>...
Forum: UNIX and Linux Applications 09-10-2008
6,021
Posted By ankimo
fantastic. thanks, era.
fantastic. thanks, era.
Forum: UNIX and Linux Applications 09-10-2008
6,021
Posted By ankimo
thank you, otheus! i really appreciate your help.
thank you, otheus! i really appreciate your help.
Forum: UNIX and Linux Applications 09-10-2008
6,021
Posted By ankimo
passing regular expressions to mysql via $1
hi, unix and mysql gurus.

i'm trying to create a simple ksh script that accesses the mysql system database table, user. the idea is that the user can call the script with a regular expression to...
Showing results 1 to 23 of 23

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