How can I compare two decimal values within a function using Bash? Function fun2 isn't comparing the decimal values. Is there a way to do this using Bash or Korn?
#!/bin/bash
set -x
x=1
z=110
function fun1() { i=`bc << EOF 2>> /dev/null
scale=3
... (1 Reply)
Hi,
Actually i stored all validdisks in one array and corresponding partitions required for all individual disks in other array..
Example:
Validdisks=dsk2 dsk3 dsk5
ValidPartition=4 4 3
Now i have to create domain..
Domain creation can be done by below commands:
fs_setup -d... (1 Reply)
Simple question. What's the difference (pros and cons) between these two:
if ; then
condition1
elif ; then
condition2
fi \
&& condition1 \
|| condition2Is the second method faster as the whole line gets loaded into memory? Just looking for some tips of when I should use... (2 Replies)
HI Unix Gurus,
I have a number of SELECT count(*) statements in an input file and I want to execute it using a shell script but one by one using loop in script....
How can I do this..... (7 Replies)
Hi
I am very new to Unix programming and shell scripting. I am trying t figure out how to write a little script that will output the number of directories. I can find the number of directories using ls -l | grep "^d" | wc -l I can not figure out how to do it so when I type the name... (8 Replies)
Hi Guys!
Anybody know how can I use a nawk or awk on a script and printing the NAME, SECTION (must be 410 or 411 or 414) and TOTAL COST of CLASS 1 and 3 combined must be greater than 50. See below desired output file.
input.txt:
NAME,CLASS,COST,SECTION
JOHN,1,10,410
JOHN,2,20,410... (2 Replies)
Hi ,
I have a script which has multiple awk and sed commands like below.
First one :-
find /root/src/ -name "*csv" -size 0 -exec rm {} \;
Second one: -
ls *SRE*.txt > SRT_TRAN.dat
rm *asr*.txt
Third one :-
find /root/src/ -name '*.csv' | while read FILENAME ;
do
awk... (2 Replies)
In shell scripting, I can create a conditional statement based on the success or failure (exit status)of a command such as:
pinger()
{
ping -c 2 $remote_host >/dev/null 2>&1
ping_stat=$?
}
pinger
if ]; then
echo "blahblahblah"
exit 0
fi
how is this done using Python using... (3 Replies)
Bash shell, variables i and rem are working fine in 2 separate for loops, but I'd like to consolidate them like this:
for && This gives syntax error on &&.
Thanks in advance for direction. (5 Replies)
Say I have a for loop that parse through a file....Say it look for the colors red and blue in sections of the file. Say it find red before it find blue in the file.
Say I have two if statements in the for loop
Something like if blue is found print blue is my favorite color is the first if... (7 Replies)
Discussion started by: scj2012
7 Replies
LEARN ABOUT DEBIAN
prosody-migrator
prosody-migrator(8)prosody-migrator(8)NAME
prosody-migrator - Migrate data between Prosody data stores
SYNOPSIS
prosody-migrator [OPTIONS] [SOURCE_STORE DESTINATION_STORE]
DESCRIPTION
prosody-migrator is used to move data (user accounts, rosters, vcards, etc.) between different data stores. For example this allows you to
migrate data from a file-based store to an SQL database, and vice-versa.
Note: the migrator assumes that the destination store is empty. Existing data that conflicts with data in the source store will be over-
written!
OPTIONS --config=FILENAME
Specify an alternative config file to use. The default is /etc/prosody/migrator.cfg.lua.
SOURCE_STORE
The name of the store (defined in the config file) to migrate data from. Defaults to 'input'.
DESTINATION_STORE
The name of the store (also defined in the config file) to migrate data to. Defaults to 'output'.
FILES
/etc/prosody/migrator.cfg.lua
The migrator config file.
SEE ALSO prosody(8), prosodyctl(8)AUTHOR
Matthew Wild <mwild1@gmail.com>
Prosody IM 20 April 2014 prosody-migrator(8)