Ive been trying all weekend to do this with no luck, so i have come to the forums for help.
What i want to do is check if an inputed character is inside a variable.
for example,
if
i would like to see if a newly inputed number is already inside that variable before putting it in.
i hope ive explained myself enough.
p.s. if it is possible to use SED/AWK i cant use those so solutions without using those would be awesome.
thanks in advance
Without knowing what you're trying to do, I'm not sure how helpful this will be:
Basically I'm just saying that for each number in the list, check to see that number matches a predefined number. In retrospect, I suppose it could have just as easily been:
Or since you you were looking for awk
I'm sure someone else can come up with better solutions, but this is what I've got at 5AM.
I would like to know how to pass a variable inside a variable to a function.
sample code below
--------------
for x in 1 9
do
check_null $C$x ##call function to check if the value is null
if
then
echo "line number:$var_cnt,... (2 Replies)
im having trouble doing this:
i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba
is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's?
im guessing its like getting the 1's compliment of the string
im doing this in... (2 Replies)
i am a newbie to shell script,so i want a kshell script in which i need to check for a particular character inside a file through conditional looping(like if ,case,while)and if that character exists ,then substitute a given character to that character.
consider a file test.txt,inside the file... (1 Reply)
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)
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
echo "hello123" | tr -dc '' | wc -c
using this command i can count the no of times a number from 0-9 occurs in the string "hello123"
but how do i save this result inside a variable?
if i do
x= echo "hello123" | tr -dc '' | wc -c
that does not work...plz suggest..thanks (3 Replies)
variables are stored in this format
D0000, D12345, S1234, D12345 | KestrelPrdV2_0.build.177 - svn 141115 tag as V2.0.0.14
D0000, D12345, S1234, D12345
My question is how can I check the first character of each variable stored in array.It should be start with D or S.
Please help... (7 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Hi guys,
I have a file "abc.dat" in below format:
FILE_PATH||||$F_PATH
TABLE_LIST||||a|b|c
SYST_NM||||${SRC_SYST}
Now I am trying to read the above file and want to print the value for above dollar variables F_PATH and SRC_SYST. The problem is it's reading the dollar variables as... (5 Replies)
Discussion started by: abcabc1103
5 Replies
LEARN ABOUT PHP
intlcalendar.getweekendtransition
INTLCALENDAR.GETWEEKENDTRANSITION(3) 1 INTLCALENDAR.GETWEEKENDTRANSITION(3)IntlCalendar::getWeekendTransition - Get time of the day at which weekend begins or ends
Object oriented style
SYNOPSIS
public int IntlCalendar::getWeekendTransition (string $dayOfWeek)
DESCRIPTION
Procedural style
int intlcal_get_weekend_transition (IntlCalendar $cal, string $dayOfWeek)
Returns the number of milliseconds after midnight at which the weekend begins or ends.
This is only applicable for days of the week for which IntlCalendar.getDayOfWeekType(3) returns either IntlCalendar::DOW_TYPE_WEEKEND_OFF-
SET or IntlCalendar::DOW_TYPE_WEEKEND_CEASE. Calling this function for other days of the week is an error condition.
This function requires ICU 4.4 or later.
PARAMETERS
o $cal
- The IntlCalendar resource.
o $dayOfWeek
- One of the constants IntlCalendar::DOW_SUNDAY, IntlCalendar::DOW_MONDAY, , IntlCalendar::DOW_SATURDAY.
RETURN VALUES
The number of milliseconds into the day at which the weekend begins or ends or FALSE on failure.
EXAMPLES
See example on IntlCalendar.getDayOfWeekType(3).
PHP Documentation Group INTLCALENDAR.GETWEEKENDTRANSITION(3)