10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am running plsql using printf on a shell, but i am getting some strange error, can someone point what exactly am i missing,
$ echo $SHELL
/bin/bash
$ printf "
> SET serveroutput ON trimspool on feed off echo off
> declare
> p_val number;
> d_val varchar2(10);
> begin
> SELECT... (1 Reply)
Discussion started by: kamauv234
1 Replies
2. Shell Programming and Scripting
Hello,
i have a script that should compare between ${ARRAY}
that contains all fstab record like this :
>>echo ${ARRAY}
/ /boot
between all mountpoints in my df that is stord in ${ARRAY2}
>>echo ${ARRAY2}
/ /boot /dev/shm /var/spool/asterisk/monitor
now i have this loop:
for i in... (6 Replies)
Discussion started by: batchenr
6 Replies
3. UNIX for Beginners Questions & Answers
I am trying to write a Bash Script using a couple of arrays. I need to perform a countdown of sorts on an array done once daily, but each day would start with the numbers from the previous day. This is what I'm starting with :
#!/bin/bash
days=(9 8 7 6 5)
for (( i = 0 ; i < ${#days} ; i++... (4 Replies)
Discussion started by: cogiz
4 Replies
4. Shell Programming and Scripting
Hi,
I am trying to do something similar to the for loop example from KSH For Loop Array: Iterate Through Array Values
$: cat y.ksh
#!/bin/ksh
# set array called nameservers
set -A nameservers 192.168.1.1 192.168.1.5 202.54.1.5
# print all name servers
for i in ${nameservers}
do
... (3 Replies)
Discussion started by: newbie_01
3 Replies
5. Shell Programming and Scripting
I am trying to look through one of my directories to remove certain files. I am pretty new to Unix and bash so I just need a little help in starting this. I know I would have to write two loops one to iterate the directories and one to iterate the files. How would I write the loops? (3 Replies)
Discussion started by: totoro125
3 Replies
6. Shell Programming and Scripting
Hi,
I am writing a script to split a log file - the log could contain multiple days worth of logs. The second line of the log contains the string "Version ". In my test log which comprises of two days worth of logs, this string appears twice - once each day.
Essentially I would like to split... (7 Replies)
Discussion started by: pmurray21
7 Replies
7. UNIX for Dummies Questions & Answers
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies
8. Shell Programming and Scripting
Hi all,
I am working on a backup based script, in which it enters to a directory and check the sub-directories and copy the names into an array.
cd $CPFs
k=0
for i in *
do
if
then
ARRs="$i"
k=$(($k+1))
#echo "$i"
... (19 Replies)
Discussion started by: canishk
19 Replies
9. Shell Programming and Scripting
Org file
192.168.1.10 d:\adir\xdir
192.168.1.11 d:\bdir\ydir
want to covert it into
robocopy \\192.168.1.10\d$\adir\xdir\log* some_localdir\adir
robocopy \\192.168.1.10\d$\adir\ydir\log* some_localdir\bbdir (5 Replies)
Discussion started by: ydk
5 Replies
10. Shell Programming and Scripting
I currently run a script over a vpnc tunnel to back-up my data to a remote server. However for a number of reasons the tunnel often collapses. If I manually restore the tunnel then the whole thing can continue, but I want to add into my script a section whereby while the transfer is taking place,... (8 Replies)
Discussion started by: dj_bridges
8 Replies