10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I m new to shell scripting. I did some research and understand that unix treats while and other loops as new shell and hence the variable loose its value outside of the loop.
I found solution for integer variable but in mycase this is a string variable.
here variable loc is a... (6 Replies)
Discussion started by: knowyrtech
6 Replies
2. Shell Programming and Scripting
I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog.
tail -f /var/log/messages
dblogger: msg_to_dbrow: no logtype using missing
dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies
3. Shell Programming and Scripting
i try to find way to make string concatenation in csh ( sorry this is what i have )
so i found out i can't do :
set string_buff = ""
foreach line("`cat $source_dir/$f`")
$string_buff = string_buff $line
end
how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies
4. Shell Programming and Scripting
There's an input file(input.txt) which has the following details :
CBA
BA
<Please note the second record has a LEADING WHITESPACE which is VALID>
I am using the following code to read the content of the said file line by line:
while read p ; do
echo "$p"
done < input.txt
This is the... (1 Reply)
Discussion started by: kumarjt
1 Replies
5. Shell Programming and Scripting
Hello.
I'm trying to add multiple numbers with varying length and with leading zeroes in it. However, I'm getting the sum (totalHashAccountNumber) without the leading zeroes in it. How do I retain the leading zeroes?
Please pardon the lengthy code.. I'm getting the hash account number from 2... (2 Replies)
Discussion started by: udelalv
2 Replies
6. Solaris
Hi,
Is the contents in /var/log/syslog and /var/adm/messages are same??
Regards (3 Replies)
Discussion started by: vks47
3 Replies
7. Solaris
what is the difference between tha /var/adm and /var/sadm files in solaris 10 Os
please can any one respond quickly
thanking you (2 Replies)
Discussion started by: wkbn86
2 Replies
8. Shell Programming and Scripting
Hi All,
As per my understanding, value of variable is retained outside function.
But the value of array myarrayDriver is not retained outside function. Could you please tell the reason for the same..
code:
readingConfigFile()
{
search_keyword="$1"
i=0
for pointer in $(cat... (7 Replies)
Discussion started by: ajincoep
7 Replies
9. Solaris
hi sirs
can u tell the difference between /var/log/syslogs and /var/adm/messages
in my working place i am having two servers.
in one servers messages file is empty and syslog file is going on increasing..
and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies
10. Shell Programming and Scripting
Bourne shell
Solaris
I'm trying to set a flag to perform an action only when data is found. So I initialize the flag with:
X=0
Then I read the data:
if ; then
while read a b c
do
X=1
done < ${inputFile}
fi
The problem is that X will be set to 1 inside the while loop but when... (5 Replies)
Discussion started by: gillbates
5 Replies