10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
HI
I have a dsv file that looks like:
<<BOF>>
record_number|id_number|first name|last name|msisdn|network|points|card number|gender
312|9101011234011|Test Junior|Smith|071 123 4321|MTN|73|1241551413214444|M
313|9012023213011|Bob|Smith|27743334321|Vodacom|3|1231233232323244|M... (4 Replies)
Discussion started by: tera
4 Replies
2. Ubuntu
Hi guys,
I recently managed to write up my working script, but now I have a problem.
If the file isn't there in the remote server, my actual script jumps it and all ok, but I need something like this:
Search file -> if there, then download -> if not, download next file in the list.
Any... (7 Replies)
Discussion started by: virtus96
7 Replies
3. Shell Programming and Scripting
Hello,
I want to check the value of all MySQL columns.(column name is "status") via bash script.
If value is "0" at I want to make only single column value to "1"
I have many "0" values on mysql database(on "status" column)
"0" means it is a draft post. I want to publish a post. I... (2 Replies)
Discussion started by: tara123
2 Replies
4. Shell Programming and Scripting
I'm running mysql in a bash script
mysql <<EOF
query
EOF
one query is like this:
UPDATE $dbname.$prefix"config" SET value = $var WHERE "$prefix"config.name = 'table colname';
with variable
but it's giving an error
i'm not sure what to put for
"$prefix"config.name
the table... (3 Replies)
Discussion started by: vanessafan99
3 Replies
5. Shell Programming and Scripting
i'm trying to write a bash script that executes a mysql statement
mysql -sN -e INSERT INTO "$database"."$tableprefix"users (var1, var2,var3) VALUES (123, '1','')
i don't know where to put the quotes
it doesnt work with this one: `
it seems i can only put double quotes around the... (0 Replies)
Discussion started by: vanessafan99
0 Replies
6. Shell Programming and Scripting
Can someone tell me the syntax to run a shell script from within MySQL? I know there is a way to do it, but I can't remember the syntax. I thought it was something like:
mysql> \. /user/myscript;
but I get this error:
Failed to open file '/user/myscript;', error: 2
Please help!... (4 Replies)
Discussion started by: peterv6
4 Replies
7. Shell Programming and Scripting
Ok the issue I have is a bit complicated, for me, and my understanding of shell programming and bash is non-existent.
Background: I do web development for a team of programmers that make custom kernels for the Android OS. The guys are using a bash script (through gerrit or github, like I said... (4 Replies)
Discussion started by: Nyght
4 Replies
8. Shell Programming and Scripting
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 understand why this is failing, it works fine when run from cmd but when is run in a bash script,... (1 Reply)
Discussion started by: ktm
1 Replies
9. Shell Programming and Scripting
Hi all,
I am running this script on Mandrakelinux release 10.1, 2.6.8.1-12mdksmp #1 SMP
I have also installed 'expect' separately.
I have created an Rsync script, but before any Rsync command does run, a MySql dump must be done first, and I am battling a bit to pass the MySql password from... (2 Replies)
Discussion started by: codenjanod
2 Replies
10. Shell Programming and Scripting
Hi.
I'm having trouble using gawk within a bash script and I can't figure out why.
I have a command that takes in a data file with two columns, the first one numbers and the second words. My code takes each line, and prints the word its corresponding number of times. The code works from the... (2 Replies)
Discussion started by: cdislater
2 Replies