10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I tried the below :
#!/bin/ksh
testvar=$(
sqlplus $user/$pass << EOF
set pagesize 0 feedback off verify off heading off echo off;
whenever sqlerror exit 1
SELECT 1+1 FROM DUAl;
COMMIT;
EXIT;
EOF)
echo "testvar="$testvar
The output that I am getting is :
> sh example.sh... (3 Replies)
Discussion started by: SriRamKrish
3 Replies
2. Shell Programming and Scripting
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
3. Shell Programming and Scripting
root@intel_5500_server:/tmp# ID_GUEST="01:00.0"
root@intel_5500_server:/tmp# echo $ID_GUEST|sed 's%:%\\:%g'
01\:00.0
root@intel_5500_server:/tmp# ID_GUEST_P=`echo $ID_GUEST|sed 's%:%\\:%g'`
root@intel_5500_server:/tmp# echo $ID_GUEST_P
01:00.0
root@intel_5500_server:/tmp#
if I assign... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
4. Shell Programming and Scripting
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies
5. Shell Programming and Scripting
I have a group of variables myLINEcnt1 - myLINEcnt10. I'm trying to printout the values using a for loop. I am at the head banging stage since i'm sure it has to be a basic syntax issue that i can't figure out.
For myIPgrp in 1 2 3 4 5 6 7 8 9 10; do
here i want to output the value of... (4 Replies)
Discussion started by: oly_r
4 Replies
6. Shell Programming and Scripting
Simple enough problem I think, I just can't seem to get it right.
The below doesn't work as intended, it's just a function defined in a much larger script:
CheckValues() {
for field in \
Group_ID \
Group_Title \
Rule_ID \
Rule_Severity \
... (2 Replies)
Discussion started by: Vryali
2 Replies
7. Shell Programming and Scripting
Hi
I have webserver that I do read data from.
Data are stored like this:
Huston |1
Portland |2
Hazen |1
Minneapolis |4
Albany |1
Pittsburg |1
Albany |1
Huston |1
Portland|1
Hazen |2
Albany |2
Huston |1
Hazen |1
Script #!/bin/sh
user="admin" (1 Reply)
Discussion started by: Jotne
1 Replies
8. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
9. Shell Programming and Scripting
Hi Gurus
I have a file called /tmp/CMDB which looks like this
serial: 0623AN1208
hostname: server1
model: x4100
assetID: 1234
I am writing a for loop that will go through this file line by line creating a variable of itself. Using the first iteration of the loop (i.e. the first line) as... (6 Replies)
Discussion started by: hcclnoodles
6 Replies
10. Shell Programming and Scripting
i am using the below script and trying to move files in that directory in that pattern to archive. But it doesn;t seem to take the metacharacters. Please sugggest.
Code
Debug output: (1 Reply)
Discussion started by: dsravan
1 Replies