Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: vino_hymi
1,319
Posted By vino_hymi
I found just now the issue not due to OS shell....
I found just now the issue not due to OS shell. But the syntax error arises when we use the below code in user function

shopt -s extglob

rm -rf !(test1|test2|test3)

---------- Post updated...
1,319
Posted By vino_hymi
bash for the both. Just now i got the...
bash for the both.

Just now i got the additional info even it fails in Mac OS. And the below code fails particularly when inside the user function.

#!/bin/bash
SRC_HOME=/u/home/test/src
...
1,319
Posted By vino_hymi
Yes, i did. ---------- Post updated at 09:51...
Yes, i did.

---------- Post updated at 09:51 PM ---------- Previous update was at 09:40 PM ----------

And one more information, the script works perfectly in my Mac bash terminal but fails in...
1,319
Posted By vino_hymi
Global Pattern - exclude directories
All,

I am trying delete folder by adding pattern not to delete certain folders. But i struck with error.

When i use below command from command line, it works fine.

shopt -s extglob
rm -rf...
959
Posted By vino_hymi
Like to know is there an alternative for...
Like to know is there an alternative for ${MONTH_${DAY}_YEAR} if it is not possible.

Ideally I like to use the value of MONTH_MONDAY_YEAR in the for loop

for i in ${MONTH_${DAY}_YEAR}
959
Posted By vino_hymi
Variable variables
Hello,

Can you please help here?

DAY=$1

MONTH_MONDAY_YEAR = 1 2 3 4



for i in ${MONTH_${DAY}_YEAR}
do
echo ${i}
done


./test.sh MONDAY
./test.sh: line 3:...
5,150
Posted By vino_hymi
Yes, the issue with the it hangs. But I tried ,...
Yes, the issue with the it hangs. But I tried , still no luck.
5,150
Posted By vino_hymi
No. Its doesn't exit the loop even after the...
No. Its doesn't exit the loop even after the changes.
5,150
Posted By vino_hymi
JBOSS_INST_ARGS=01 02 if [ "$JBOSS_CMD_TYPE"...
JBOSS_INST_ARGS=01 02

if [ "$JBOSS_CMD_TYPE" = "start" ]; then
for i in $JBOSS_INST_ARGS; do

/u/jboss-6.1.0.Final/bin/jboss_init_wise$i.sh start;
done
fi

i missed to add fi in the post,...
5,150
Posted By vino_hymi
For loop exit
Below for loop not exiting. Can someone help?

JBOSS_INST_ARGS=01 02

if [ "$JBOSS_CMD_TYPE" = "start" ]; then
for i in $JBOSS_INST_ARGS; do
...
10,665
Posted By vino_hymi
@itkamaraj: works fine. @balajesuri: Thanks...
@itkamaraj: works fine.

@balajesuri: Thanks for reply. But your solution restricted to 4 args, but it doesnt handle for n args.


Thanks for the both.

-VInodh
10,665
Posted By vino_hymi
Forgot to mention. Small change.. The first...
Forgot to mention. Small change..

The first argument is fixed, but remaining no . of args may be incremental.

I mean, I want all the args $2 ...$n to be assigned to variable.
10,665
Posted By vino_hymi
Cut | command line args
Hi,

Can you please hint me how to achieve the below?

Input:
$./script.sh start 1 2

Internally inside the script i want to set a single variable with $2 and $3 value?

Output:

CMD=$1...
4,476
Posted By vino_hymi
This doesn't work out!!!!
This doesn't work out!!!!
4,476
Posted By vino_hymi
I think the issue is with secone sed. Any...
I think the issue is with secone sed. Any hints....
4,476
Posted By vino_hymi
No. It doesn't work out. It assumes $URL as...
No. It doesn't work out. It assumes $URL as string value.

The output:

ppend_desc='\<br\>\<br\>\
\n\<b\>alc131AIXqa199\<\/b\>\
\n\<br\>\<br\>\<a href=\""$URL"...
4,476
Posted By vino_hymi
sed replace
Hi,

Below is the code. The issue is exact value of echo $URL is not replaced in sed in side the function. Any hints..

#!/bin/bash

envurls()
{

URL=`cat temp.txt | sed -e 's%\/%\\\/%g' |...
1,929
Posted By vino_hymi
Sorry just I made a mistake in setting the value...
Sorry just I made a mistake in setting the value to variable.

The command sed "0,/$searchenv/s//&\n$appendenv/" inputfile > outfile worked perfectly.

Thanks once again.
1,929
Posted By vino_hymi
No exceptions or No Changes in output file on...
No exceptions or No Changes in output file on using latest command mentioned sed "0,/$searchenv/s//&\n$appendenv/"
1,929
Posted By vino_hymi
sed '0,/<a...
sed '0,/<a class="string-array">/s//&\n<string>java<\/string>/' inputfile > outfile

This exactly worked for me.

One more hint required,

I set the pattern values into variables and trying to...
1,929
Posted By vino_hymi
Got the below exception, sed: -e expression...
Got the below exception,

sed: -e expression #1, char 49: unknown option to `s'
1,929
Posted By vino_hymi
Search and Append
All,

I stuck up for the logic, how to implement the below thing in script.

-Search for <a class="string-array"> line and in next line of search string append with <string>java</string> in a...
7,900
Posted By vino_hymi
sftp shell script - Password read error.
Hi,

I have script which does the sftp function. In the script in one place it able to read the password from file and other place files with below error.

warning: has much more security than...
1,028
Posted By vino_hymi
Cut and read
Hi,


I have a file which contains comma separated values ex: abc, bdc
I need to read this file and provide each value(one by one) as a input to other function.

Can some one helpme...
...
4,180
Posted By vino_hymi
Okay here it goes- scp...
Okay here it goes-

scp username:password@host:/export/backups/

password will be as xyz@xyz.
Showing results 1 to 25 of 58

 

Featured Tech Videos

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