Search Results

Search: Posts Made By: prasanna2166
3,160
Posted By prasanna2166
Tried something like this, but I guess this will...
Tried something like this, but I guess this will work only for first identical characters (a) and will not work for b.


i/p=aaaabbcaa
length=${#i/p}

for (i=0;i<$length;i++)
do
tmp=""...
3,160
Posted By prasanna2166
Count consecutive characters
Need to count consecutive characters in a string and give the output as below
i/p=aaaabbcaa
o/p=a4b2c1a2
4,255
Posted By prasanna2166
IFS(Internal Field separator)
Hi All,

I need your small help in using IFS.

I am using it like below but i am not getting the desired output.


var=ABCD,EFGH,IJKL,MNOP,QRST
export IFS=","
for x in $var
do
if [[...
1,134
Posted By prasanna2166
Thanks fpmurphy, i tried your code and it is...
Thanks fpmurphy, i tried your code and it is working fine.
1,134
Posted By prasanna2166
Hello Ravinder, Thanks for your reply. ...
Hello Ravinder,

Thanks for your reply.

echo "uname_"$no By using your above code, it just displays 2 or 3 ($no) not the actual one which needs to be displayed.


Expected output:
YYYYY...
1,134
Posted By prasanna2166
[Solved] Assigning Shell variable
Hello,

Need a small help to execute below script.


#!/bin/bash
. new.txt
for no in 3 4
do
echo $((uname_$no))
done

new.txt contains

uname_1="XXXXXX"
uname_2="YYYYY"...
6,332
Posted By prasanna2166
Hi Klashxx, It works as expected...Thanks...
Hi Klashxx,

It works as expected...Thanks much!!!
6,332
Posted By prasanna2166
Thanks Carlom for your reply. By using below...
Thanks Carlom for your reply.

By using below code, "Group 2" assigned to "VAR1" and "Group F, Group G, Group H, Group I,Group J" assigned to "VAR2", but my need is to assign all the Groups...
6,332
Posted By prasanna2166
Batch to bash conversion
Hi,

I am just trying to convert the batch script to bash script and i am stuck at one point where I have the below code


for /f "delims=" %%a in (a.txt) do (

for /f "tokens=1,2,3*...
13,772
Posted By prasanna2166
Parse XML using xmllint
Hi All,

Need help to parse the xml file in shell script using xmllint. Below is the sample xml file.


<CARS>
<AUDI>
<Speed="45"/>
<speed="55"/>
<speed="75"/>
<speed="95"/>
...
2,417
Posted By prasanna2166
Hi Rajamadhavan, My code is below. ...
Hi Rajamadhavan,

My code is below.

$Data = "<html>
<head>
</head>
<body>
<table border=1 cellspacing=0 cellpadding=0 width=85%>
<tr style="text-align:center bgcolor=brown" font-color:>...
2,417
Posted By prasanna2166
Sending an Email using MIME protocol
Hi All,

I just need to send an email using MIME protocol from perl script. The data of an email should be a HTML table(contains some datas). I just tried to send a normal text which is working...
4,399
Posted By prasanna2166
Highlight text in shell o/p
Hi All,

Can anyone tell me how to highlight a particular text in shell output or formattting a text in shell ?
1,238
Posted By prasanna2166
Hi Greet_sed, Are you missing something in...
Hi Greet_sed,

Are you missing something in the below line?

if ($a) {
## call function to send mail;

I tried something like

my $a = `ct lsview | wc -l`;
if ($a == 0)
{
## NO views;
##...
1,238
Posted By prasanna2166
Help on Perl script
Hi All,

I m just writing a perl script which is using cleartool commands.

My requirement is
Need to check the list of views and send mail depends on the result.

Command to check the...
1,204
Posted By prasanna2166
Provide 2 inputs when prompts
Hi All,

I am a novice to UNIX, i need to know is there a way to provide 2 inputs when the shell prompts and i need to assign those 2 values to 2 separate variables. I dont want to give those...
Showing results 1 to 16 of 16

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