10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
This is a script which to create an opvn user, I want which answer automatically to a certain part so, I try this, it works without the red part but I must type manually.. :
#!/bin/bash
## Environnement ##
LC_ALL=C
## Paths ##
rsa_dir="etc/openvpn/easy-rsa"... (10 Replies)
Discussion started by: Arnaudh78
10 Replies
2. Shell Programming and Scripting
Hi friends,
Need your help again to get a best approach for the below scenario.
I am previously having one shell script which accepts request_id/s as the command line argument.
single req_id arg= 1111
Multiple arg= 1111,2222,3333
which gets passed to the embedded sql inside to... (9 Replies)
Discussion started by: Showdown
9 Replies
3. Shell Programming and Scripting
Team ,
I am trying to write a case condition for database backups.But I am unable to make the script to read input from command line .
while true ;do
read -p "Do You Wish To Take Database Backup ?? " yn
case $yn in
*) echo " YES take backup ";;
*) echo " NO BACKUP " ;;
... (9 Replies)
Discussion started by: rocking77
9 Replies
4. Shell Programming and Scripting
I'm using the below to get multiple input from USER and it is working, is there any better way in awk array single liner?
echo "Enter Multiple input (Ctrl+d to exit)"
>output
while read A
do
echo "$A" >>output
done (3 Replies)
Discussion started by: Roozo
3 Replies
5. Shell Programming and Scripting
Hi,
We are having a java server which can run on command line and once initiated, it will prompt options to enter from 0 to 5. The java program kickoff respective operation once number is entered between 0 to 5. However i want to always enter "1" and write another shell program wrapper to start... (4 Replies)
Discussion started by: surya5kn
4 Replies
6. Shell Programming and Scripting
I have a script that is working when I input parameters from the command line. I was under the assumption that i could use a redirect for the input.
script fred.sh:
value1=$1
value2=$2
print $value1 $value2
Running from command line:
fred.sh 1 2 1 2
Contents of file fred.txt:... (3 Replies)
Discussion started by: djm2112
3 Replies
7. Shell Programming and Scripting
I have a script built that takes the standard inputs $1 $2 $3 after the name and parses some data.
hexsite=`echo "obase=16;$1"|bc`
hexfix=$(printf "%.3X" 0x$hexsite)
if || ;then
type=33
elif || ;then
type=59
elif ;then
type=99
else type=00
fi
cat /directory/*.2012$3*|
I am... (8 Replies)
Discussion started by: PCGameGuy
8 Replies
8. Shell Programming and Scripting
i have this script that reads a file "listall_101111" where 101111 varies.
awk '{print $0,$1}' listall_101111 | sed -e 's/\(.*\).$/\1/g' | awk '{print $6,$2,$3,$4,$5}' | sort -nrk5 | nawk 'NR==1{m=$5;a++;b=(b)?b:$0;next}$5==m{a++;b=(b)?b:$0}END{for (i in a){print b,a}}' | grep -v ^LG | sort... (4 Replies)
Discussion started by: aydj
4 Replies
9. Shell Programming and Scripting
Hi guys, I have a piece of snippet below which asks the user to input some numbers
if isDatasubEnabled && isReconEnabled; then
echo "1 = CGT, 2 = Subscriber, 3 = Order Monitor, 4 = Revaluations, 5 = Reconciliation, 6 = All, 7 = Exit"
elif isDatasubEnabled &&... (4 Replies)
Discussion started by: pyscho
4 Replies
10. Shell Programming and Scripting
Hi All,
I wish to automate the unix command 'su' through a shell script.
I would like to pass the content of a file as password to 'su' command.
My script is as below,
#! /bin/sh
su userA
while read line
do
rpm -ivh $line
done < pwd.txt
where pwd.txt contains the password of... (6 Replies)
Discussion started by: little_wonder
6 Replies