10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I would like to call a .sql file from a .sh file in linux. The .sql file will contain queries to MySQL database.
I am able to call the .sql file by running .sh file in linux, but the sql query is not working. Below is my syntax. The select statement is throwing below error.
./sample.sql: line... (1 Reply)
Discussion started by: qytan
1 Replies
2. Shell Programming and Scripting
Run a loop that will search for a file to thousand machine and know who owns the file
$ for i in abc{01..02}
> do
> echo -n $i
> ssh $i "sudo find / -name .ssh -exec ls -l {} \;|grep id"
> done
abc01-rw-------. 1 root root 1675 Nov 10 2018 id_rsa
abc01-rw-------. 1 root root 1675 Nov 14... (6 Replies)
Discussion started by: invinzin21
6 Replies
3. Shell Programming and Scripting
Hi All,
I have a command which provide this output
symaccess -sid 624 show PG_E36_PG6P -type port |grep FA
FA-5G:1
FA-6G:0
FA-11G:0
FA-12G:1
I need to use the value in loop like this (5 Replies)
Discussion started by: ranjancom2000
5 Replies
4. Shell Programming and Scripting
Thank you for taking the time to read my issue. I need to set up a script to run from a wagon wheel type toplogy where 1 server needs to query about 10 to 15 remote servers for duplicate values in a database table. If a duplicate value is found, send an email to me( or wall command to console).... (5 Replies)
Discussion started by: lutador72
5 Replies
5. Shell Programming and Scripting
Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database.
I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :(
What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to export the data to an .ixf file.
I have read the table names from a .dat file and those table name should be passed to the select * from schema.TABLENAME query .
I am trying the below loop
while read TABLE; do
db2 EXPORT TO ~/data_export/$TABLE.ixf OF IXF MESSAGES... (5 Replies)
Discussion started by: vikyalex4
5 Replies
7. Shell Programming and Scripting
I have a txt file with contents of acct nbr's like:
22222222222
33333333333
33445566778
I need to write a script which takes each acct nbr in the file and run the query like:
select seq_nbr from event where acct_nbr='22222222222'
and the query's output should be passed to a... (0 Replies)
Discussion started by: Rajesh Putnala
0 Replies
8. Shell Programming and Scripting
I need to run sql script from shell script which takes the input from a file and contents of file will be like :
12345
34567
78657
and query will be like :
select seq_nbr from bus_event where event_nbr='12345';
select seq_nbr from bus_event where event_nbr='34567';
select seq_nbr... (1 Reply)
Discussion started by: rkrish
1 Replies
9. Shell Programming and Scripting
I need to write a script, which takes the input a log file and create output file with acct no's line by line from selected records with text like (in red) :
18:51:18 | 217863|Acct 0110855565|RC 17608| 16 Subs| 1596 UsgRecs| 2 Secs| 430 CPUms| prmis2:26213 <MoveUsage d
aemon needs to run... (7 Replies)
Discussion started by: rkrish
7 Replies
10. Shell Programming and Scripting
Hi Forum,
I am struggling with the for loop in shell script.
Let me explain what is needed in the script.
I have a file which will conatin some strings like
file1
place1
place2
place3
checkpoint
some other text
some more text
Now what my requirement is
the words ... (2 Replies)
Discussion started by: siri_14
2 Replies