Search Results

Search: Posts Made By: samsan
3,613
Posted By samsan
Excellent ongoto, thank you. it works now...
Excellent ongoto, thank you. it works now :):):):):):):b:
3,613
Posted By samsan
ongoto , I really appreciate your help , I...
ongoto ,

I really appreciate your help , I am still getting the following error:-


$ ./test2
Hello
1-Jack(12) 2-Kim(22) 3-Nick(89) 4-Sam(78)
5-Smith(7)
Which name you want to...
3,613
Posted By samsan
Hi ongoto It does not likethese two lines:- ...
Hi ongoto
It does not likethese two lines:-

idx=$(( $iname - 1 )) # array index count from zero AGES[$nam]=$age # update AGES array
I am getting the following error :-
bad array...
3,613
Posted By samsan
Thank you sea , it helped me with other code :) ,...
Thank you sea , it helped me with other code :) , but it is not what I am looking here
3,613
Posted By samsan
i apologize for the misunderstanding , this is...
i apologize for the misunderstanding , this is not the really code. I just wrote the above code to gave you in idea of what I am trying to do.
I fixed the code above , and now should run. Let say...
3,613
Posted By samsan
Reduce the number of lines by using Array
I have the following code to count the number of how many times the name occurred in one file. The code is working fine and the output is exactly what I want. The problem is the real code has more...
1,185
Posted By samsan
RudiC, yeah I do see the problem but I did not...
RudiC,
yeah I do see the problem but I did not know how to fix , however , the way pravin27 provided helped. thank you
1,185
Posted By samsan
excellent ,thank you . that's work with me
excellent ,thank you . that's work with me
1,185
Posted By samsan
Loop overwrite first input
function one {
echo "Who is here?"
read name
 
echo "Who old are you $name?"
read age

if [ "$name" == "Sam" ]; then
Sam="$age"
else
...
2,244
Posted By samsan
Thank you every one for sharing and helping , all...
Thank you every one for sharing and helping , all codes which you provided to me working fine , now I'am confused with which one I go with. I like the one provided by sea because it is the shorter...
2,244
Posted By samsan
Don, I meant when user hit enter without...
Don,
I meant when user hit enter without entering any data. Sorry for the confusing. Thanks for helping.

Cochise,
sorry for the confusion. I just need like the following:-
Who you are?
If...
2,244
Posted By samsan
If else with one variable
Hello,

Can someone tell me please what am missing here :-




echo "Who are you!"

read line

if [ "$line" != "" ]; then
echo "Hi $line"

else

set line="Kim"

echo " Hi $line"
1,262
Posted By samsan
Both codes which MadeInGermany and Don Cragun ...
Both codes which MadeInGermany and Don Cragun provided are exactly what I wanted . I really appreciated your time and helps.
Also , thank you junior-helper for your time as well, but we are trying...
1,262
Posted By samsan
Don , I am using Linux and AIX, I...
Don ,
I am using Linux and AIX,

I agree with you, keeping the number will be easy , however , my list has around 30 iteams , I am using the above example just to give me hint .

so my...
1,262
Posted By samsan
Case with list of pickes
I need help with following :-
I have the following function:-

function queuecreate {

echo "1 - Bread"
echo "2 - Milk"
echo "3 - Suger"
echo "4 - Coffee"
...
883
Posted By samsan
The output of this:- for LOG in `cat...
The output of this:-

for LOG in `cat /tmp/Conf.ini | grep DataPath= | cut -d'=' -f2 | sort -u` do tail -93 $LOG/errors/Err.LOG >> $APPS.Output done09/07/14 12:48:54 AM - Process(21603.21)...
883
Posted By samsan
RudiC, Thats not going to work because the...
RudiC,

Thats not going to work because the App name are not including in the out put of the logs:- here is example of the output:-

09/07/14 12:48:54 AM - Process(21603.21) User(xxxx)...
883
Posted By samsan
For do loop
I am writing a health check script , I need some for adding the following to my script:-

In the beginning of my script I am using if loop my script start like this :-


for APPS in `cat...
1,562
Posted By samsan
Thank you Scrutinizer, thats what I needed ....
Thank you Scrutinizer, thats what I needed . Thanx every one
1,562
Posted By samsan
Sorry Ravinder , I am new here , next time I...
Sorry Ravinder , I am new here , next time I follow the rule. No it is not homework. It is part of script I am wrting for WebSphere WAS for my work. I am using the above as sample example
1,562
Posted By samsan
Thank you SriniShoo, but it did not work, I am...
Thank you SriniShoo, but it did not work, I am getting this error

awk: syntax error near line 1
awk: bailing out near line 1

by the way , I am using SunOS
1,562
Posted By samsan
Capture the value between brackets
Hi
I am having hard time getting this right and need some help. I Have 3 files, and everyone contains the following:-

File1
Today, we have Name(Jack) Age(19) Class (A2)
Today, we have...
2,904
Posted By samsan
Thank you ,that's what I needed . Thanks for help...
Thank you ,that's what I needed . Thanks for help Scrutinizer
2,904
Posted By samsan
Loop over multiple arrays
Hi All
I need really really help with this :-

I have two files ( File1 , File 2) both files are output of two different scripts.

File1 usually has a list of names ( sometimes 3 names...
Showing results 1 to 24 of 24

 
All times are GMT -4. The time now is 07:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy