10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Why does this cause an infinite loop?
#!/bin/bash
while ]; do
echo "$(ipcs | awk '{print $2}')"
done
echo
exit 0
I have verified I eventually get Semaphore so it should break out of the while loop.
$ echo $(ipcs | awk '{print $2}')
Shared shmid 262145 294914... (6 Replies)
Discussion started by: cokedude
6 Replies
2. Shell Programming and Scripting
Hi,
I have the following requirement.
There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"
I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies
3. Shell Programming and Scripting
I have a program to create a directory if not present. Here is the program.
FYI: Directory name format: YYYY_MM_DD
#!/bin/bash
date=`date +%Y_%m_%d`
presence=$(ls -lrt /TS_File/ | grep "$date" | awk '{print $9}')
if
then
mkdir /TS_File/$date
else
echo "Unable to Create... (5 Replies)
Discussion started by: nthiruvenkatam
5 Replies
4. Shell Programming and Scripting
i need one help....
if i have a string like aaaaa,bbbbb,ccccc,aaaaa
How to to split the string and check howmany times aaaaa will be in that string?
Thanks (7 Replies)
Discussion started by: karthinvk
7 Replies
5. Solaris
I Have a script which gets the status of oracle database and if the status is READ WRITE ..it should echo "db is up " else "db is down"
Here is the code
if
then
echo "db up"
else
echo "db down"
fi
done;
The script is giving me out put "db down" even thoug the value of... (6 Replies)
Discussion started by: njafri
6 Replies
6. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I have standard web server log file. It contains different columns (like IP address, request result code, request type etc) including a date column with the format .
I have developed a log analysis command line utility that displays... (1 Reply)
Discussion started by: TariqYousaf
1 Replies
7. Shell Programming and Scripting
I have a folder a1 with the following files
sample_1.log
sample_2.log
sample_3.log
sample_4.log
sample_5.log
sample_6.log
In another folder there is a file b with the value 5
My script should take the value 5 ( file b), compare it with the files in folder a1, if file name contains... (1 Reply)
Discussion started by: Nagesh1
1 Replies
8. Shell Programming and Scripting
Hello,
was just wondering how to compare strings in unix? I mean as in C there is a function strcmp() in string.h, is there any function in unix for that? I tried using
if
and all such variations but didn't succeed. Any help would be appreciated. Thanks in advance :) (9 Replies)
Discussion started by: salman4u
9 Replies
9. AIX
hi ,
i am trying to compre two strings
if ] or if ]
when the length of var1 is small (around 300-400 char ) it works fine
but when it is large (around 900-1000 chars) it fails
is there any limitations for this type of comparison ??? (1 Reply)
Discussion started by: amarnath
1 Replies
10. Shell Programming and Scripting
hi ,
i am trying to compre two strings
if ] or if ]
when the length of var1 is small (around 300-400 char ) it works fine
but when it is large (around 900-1000 chars) it fails
is there any limitations for this type of comparison ??? (3 Replies)
Discussion started by: amarnath
3 Replies