10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
while i've used arrays to work with variables, i've never used them to loop through a set of strings and wanted to ask the community for some feedback or assistance.
let me be specific. here's my code:
# URL port Variables
port2195=`nc -z $url2195 2195`
port2196=`nc -z $url2196 2196`... (5 Replies)
Discussion started by: hungryd
5 Replies
2. Shell Programming and Scripting
Hello,
Could someone tell me why this still returns headings?
echo "SELECT columnA from tableA group by columnA;" |
sqlplus -s ${DB_CONNECT}
set heading OFF |
while read line
do
arr="$line"
echo ${arr}
let i=$i+1
done (2 Replies)
Discussion started by: flowervz
2 Replies
3. HP-UX
HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively.
So how do i set the PS1 variable to display my current working Directory as my prompt?
I also tried PS1=$PWD,
But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies
4. Shell Programming and Scripting
Hi!
Been working on a script and I've been having a problem. I've finally narrowed it down to this variable I'm setting:
servername=$(awk -v FS=\/ '{ print $7 } blah.txt | sed 's\/./-/g' | awk -v FS=\- '{print $1}')"
This will essentially pare down a line like this:
... (7 Replies)
Discussion started by: creativedynamo
7 Replies
5. Shell Programming and Scripting
I'm a beginner in shell scripting (I'm using ksh). I'm manipulating some files and I'm using set -A to transform each read line into a numeric array.
However, inside the 'for' loop the options of set (ie '-A') are not recognized (the vi editor doesn't highlight it and it doesn't work).
Where... (4 Replies)
Discussion started by: kasumlolla
4 Replies
6. Shell Programming and Scripting
Hi Experts,
I'm having issue in assigning var with special character , please see below for complete details.
$ echo $SHELL
/bin/csh
$ cat bp
abd/asd/a
$ awk -F "/" '{print $NF}' bp | awk '{print $1}'
a
$ set a=`awk -F "/" '{print $NF}' bp | awk '{print $1}'`
$ echo $a ... (15 Replies)
Discussion started by: novice_man
15 Replies
7. Shell Programming and Scripting
I am new to the c shell script, can you let me know why the set rr= is not working.
C shell script
#! /bin/csh
Set tt= 12345_UMR_BH452_3_2.txt
set rr='echo $tt | cut –d”_” -f1'
syntax error (4 Replies)
Discussion started by: jdsignature88
4 Replies
8. Solaris
Hi
I compiled an executable on Solaris 10 which creates semaphore ( semget)
but it didn't work on solaris 9 , while it is executing sucessfully on solaris 10. It is throwing the system error that Invalid arguments ( system error 22) on solaris 9.
the ldd for the executable on two servers is as... (4 Replies)
Discussion started by: ash_bit2k2
4 Replies
9. Shell Programming and Scripting
Hi,
even after i am setting the trace on(set -x), trace is not printed.
can you please tell me what is the error. below is the code & output.
Thanks in advance,
Harish
-------------------------------------------------
test.sh
-------------------------------------------------
#!... (5 Replies)
Discussion started by: harish.madu
5 Replies
10. Shell Programming and Scripting
Hello guys it´s a pleasure to type with the unix community...I´m new in shell script and I need to insert into a #!/ksh a statment that will check if a file that I´ll receive from another script is arriving in the first working day of each month:
let´s say that I´ll reveive the following files... (1 Reply)
Discussion started by: Rafael.Buria
1 Replies