10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am new to UNIX. I am working on a script where it takes the input and produces a desired output and it works fine for one instance.
Input(One Instance):
CREATE TABLE TAB1
(
COL1,
COL2
);
CREATE UNIQUE INDEX XPKTAB1
(
COL1
)TAB1;
Output:
CREATE TABLE TAB1
(
COL1,
COL2... (8 Replies)
Discussion started by: varun2327
8 Replies
2. Shell Programming and Scripting
Please explain why this works. Am unable to find another definition for the '%', which would explain this behaviour:
spaceLeft=`df -h /myPartition | tail -1`
# output looks like: /dev/sda5 10G 1.2G 12G 29% /
set -- $space
#this deletes the trailing '%' sign, which is... (6 Replies)
Discussion started by: frododot
6 Replies
3. Shell Programming and Scripting
Hi i am new to shell script can any one please explain me the code below which is written for execution of python scripts which are located in same folder.
please explain the code line by line
ls *.py > xx
while
do
read myline || break
python $myline
done<xx
Thanks
Mukthyar.... (1 Reply)
Discussion started by: mukthar1255
1 Replies
4. Shell Programming and Scripting
Hi,
I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below.
#!/bin/ksh
SSH_USERID=khcuser
webservers="server1 server2"
... (2 Replies)
Discussion started by: elmesy
2 Replies
5. Shell Programming and Scripting
Hello Everyone,
I'm still trying to grasp many concepts in .ksh scripting, one of them being variables inside loops. My problem is the following:
* I'm trying to set a variable inside a while read loop to reuse it outside of said loop. My lines are the following :... (13 Replies)
Discussion started by: jimmy75_13
13 Replies
6. Shell Programming and Scripting
Guys,
I am new in awk , I face problem while i try to use for loop in awk,
I am using ksh, i am trying to set a for loop which runs as man times as the records in a file , the for loop like for(a=1;a<=5;a++) is working in my awk script but the one i need is not working :wall:
for example
... (8 Replies)
Discussion started by: djahmed
8 Replies
7. Shell Programming and Scripting
#! /bin/sed -nf
# Remove C and C++ comments, by Brian Hiles (brian_hiles@rocketmail.com)
# Sped up (and bugfixed to some extent) by Paolo Bonzini (bonzini@gnu.org)
# Works its way through the line, copying to hold space the text up to the
# first special character (/, ", '). The original... (1 Reply)
Discussion started by: Priyaranjan
1 Replies
8. Solaris
if
then
ROLLBACK=1 ;
elif
then
echo "Nothing to install!" ;
echo "Exiting." ;
exit 0;
Plz explaing what is the ${1:-0} in if loop?:) (3 Replies)
Discussion started by: ysrikanth
3 Replies
9. Shell Programming and Scripting
currentSid=${TWO_TASK:-$ORACLE_SID}
echo $currentSid
this script returns value of ORACLE_SID but what i am not getting is
what is ":-" doing ?? (1 Reply)
Discussion started by: zedex
1 Replies
10. Shell Programming and Scripting
I have a script which tries to read input from a user for every value read from a file. The input file is
#> more testfile
TEST1 | D200 | 12345601 | | ABC company | m
TEST2 | D201 | 12345602 | | ABC company | m
The script test.sh is as follows
while read line
do
read test?"Enter a... (5 Replies)
Discussion started by: jerardfjay
5 Replies