10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello ,
Im calling every single file inside my script like 1.sql,2.sql so on it looks so tedious. I want to replace with for loop where every file gets executed. When i use for loop im getting errorUnexpected EOF] , can anyone please help me out in this..
How i can use for loop to invoke my... (6 Replies)
Discussion started by: preethi87
6 Replies
2. Shell Programming and Scripting
We have a process where we store the database password in a config file like below from where the password is picked up and used in Database Scripts
ID, Password
But we now have a Audit Requirement not to have the passwords in Config Files directly. We have a command which could fetch the... (2 Replies)
Discussion started by: infernalhell
2 Replies
3. Shell Programming and Scripting
Hello, I am a beginner to shell programming. Coded the following for Fibonacci series.
#!/bin/bash
fib() {
i=0
j=1
arr=0
arr=1
echo "enter the limit:"
read n
while
do
fo= expr $j - 1
f1=$j
f2= expr $j + 1
arr= expr ${arr} + ${arr}
echo ${arr} (3 Replies)
Discussion started by: Rookie222
3 Replies
4. UNIX for Dummies Questions & Answers
Hi, I'd like to loop an action over all files with given extension within a folder.
The "main" action is: awk -F "\t" 'BEGIN{OFS="\t"}{if ($10=="S") print$0; }' input.txt > output.txt
The input.txt should be every file in the folder with *.subVCF extension; and the output should be a file... (3 Replies)
Discussion started by: dovah
3 Replies
5. Shell Programming and Scripting
I'm trying to get a script to iterate of an array in bash run a series of commands in those folders.
#Folder names
folders=(folder1 folder2 folder3)
#Common path for folders
fold_path="/Users/Rich/Projects/"
# For each element array copy script to folder and execute
for f in... (2 Replies)
Discussion started by: 3therk1ll
2 Replies
6. Shell Programming and Scripting
How do we execute a command inside a while loop? (7 Replies)
Discussion started by: Little
7 Replies
7. Shell Programming and Scripting
I have a below command
ALTER TABLE `abc` ADD PARTITION ( PARTITION 20130613 VALUES less than (DAY('13')));
Below is requirement
It runs in Loop
as DAY start with 13 and end with 100 along with this of counter "20130613" also increases per command
as the next command should be
... (8 Replies)
Discussion started by: kaushik02018
8 Replies
8. Shell Programming and Scripting
I have the following statement in script:
find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN2} -print | while read file; do
...
done
When there are no files located by the find comand it returns:
"find: bad status-- /home/rnitcher/test/....." to the command line
How do I get control in... (3 Replies)
Discussion started by: mavsman
3 Replies
9. Shell Programming and Scripting
Hi,
I am trying to call a certain command from within a shell script, but everytime it executes the script, only the first command runs and it comes out of the control, how do i do it?
code :
````````
#!/bin/sh
#
#
#i=1
#while
#do
# i=`expr $i + 1`
#done
StoreXML -project xnat -l... (2 Replies)
Discussion started by: virendra maloo
2 Replies
10. Shell Programming and Scripting
I want to append a file containing a list of names and the sorted contents of the file should be copied to a new file. All this should be on a single line( using pipes and redirection)
Pls help ..
thankyou (1 Reply)
Discussion started by: phiber_optik
1 Replies