Search Results

Search: Posts Made By: vivekraj
4,742
Posted By vivekraj
Use -r and -i option together.
Use -r and -i option together.
4,742
Posted By vivekraj
You try the following, sed -r...
You try the following,


sed -r 's/^(PATTERN)$/Reminder1\n\1reminder2/' <file>


If you want to affect the changes in the file,use -i option in the above sed command.
7,978
Posted By vivekraj
You try the following script. echo "Enter...
You try the following script.


echo "Enter the First(Source) Directory:"
read sdir
echo "Enter the Second(Destination) Directory:"
read ddir

if [ -d $sdir ]
then
ls $sdir > stemp
else...
2,762
Posted By vivekraj
Hi SIFA,you try the following script to do your...
Hi SIFA,you try the following script to do your task.


i=0
while read line
do
arr[$i]=`echo $line | cut -d ' ' -f 1`
let i+=1
done < input

val=0
for((j=0;j<$i;j++))
do
if [[ ${arr[$j]}...
2,898
Posted By vivekraj
As malcome said when I used grep -E or egrep it...
As malcome said when I used grep -E or egrep it worked fine.Even if you're facing problem.You can match that pattern with grep itself as following.


grep ...
19,980
Posted By vivekraj
This is for example.If you want to execute some...
This is for example.If you want to execute some command for the matched files.You try this. find -type f -exec touch {} \;
9,286
Posted By vivekraj
Hi dips_apg,I have dropped .log because you have...
Hi dips_apg,I have dropped .log because you have given some sample input and output.If you want it,try this.


sed -r 's/(.*[1-28]\.log)\..*/\1/' <filename>
9,286
Posted By vivekraj
You try the following code. sed -r...
You try the following code.


sed -r 's/(.*[1-28])\.log\..*/\1/' <filename>
1,527
Posted By vivekraj
I couldn't understand fully what you're...
I couldn't understand fully what you're expecting.

Are you expecting like this?


a[1]="A/A" || "B/B" || "C/C"
2,534
Posted By vivekraj
I think following is the best script to do your...
I think following is the best script to do your task.Before you remove the particular file in bar2 directory,you need to check whether it is a file or not.


j=0
for i in `ls dir1 `
do...
Forum: AIX 03-10-2010
3,923
Posted By vivekraj
It means,you want only the following from...
It means,you want only the following from CMD_ARGS variable.

/global/site/vendor/WAS/WebSphere6/AppServer/java/bin/java
If so,you try the following command.

...
24,050
Posted By vivekraj
If you explain your input and output,it will be...
If you explain your input and output,it will be better to understand by us.
2,383
Posted By vivekraj
I don't know why you're echoing the value and...
I don't know why you're echoing the value and comparing with max value and passing it to bc.You simply take my example script and do your script easily.

You change your condition as follows.

...
2,383
Posted By vivekraj
If anyone of the values of variable VAR1 or VAR2...
If anyone of the values of variable VAR1 or VAR2 is greater than max value or less than min value,then you need to use || operator instead of && operator in your script.If you want both the values...
5,016
Posted By vivekraj
I think signs means,you meant characters.You run...
I think signs means,you meant characters.You run the following script to do it.


if [ $# -lt 1 -o $# -gt 1 ];then
echo "<Scriptname> <file-to-run>"
exit 1
fi

rows=`wc -l $1 | cut -d ' ' -f...
9,004
Posted By vivekraj
You need to compare each and every argument by...
You need to compare each and every argument by for loop and if condition.
28,870
Posted By vivekraj
What?I am not saying my internal thoughts.I just...
What?I am not saying my internal thoughts.I just specified that your solution won't work for all the conditions.But,you're expressing some other informations.First refer your post and tell.Why I...
28,870
Posted By vivekraj
Hello thillai,how you're ensuring that there are...
Hello thillai,how you're ensuring that there are only three characters in the last field.Don't simply give solution for the example data given.Give some useful solutions which will work for all the...
4,946
Posted By vivekraj
I understood your idea.You want to run the...
I understood your idea.You want to run the process as background inside the code.But,I don't know which process you want to run.You can pass the & as an argument to this program from command line by...
3,350
Posted By vivekraj
Hello frans,we can't use the join command...
Hello frans,we can't use the join command directly to solve this problem.Because,mr_monocyte wants to deal with 1000 files not only two files which is accepted by join command.But,its a good idea if...
9,004
Posted By vivekraj
You need to change that as $2 to $4.
You need to change that as $2 to $4.
9,004
Posted By vivekraj
Yeah Thillai,nice of you.But,it is better to...
Yeah Thillai,nice of you.But,it is better to mention before which means in your first reply itself.
6,029
Posted By vivekraj
Hi ASGR,it is simple.You try this, ...
Hi ASGR,it is simple.You try this,

FLAGS[0]="CFLAGS=\"-arch x86_64 -g -Os -pipe -no-cpp-precomp\""
FLAGS[1]="LDFLAGS=\"-arch x86_64 -bind_at_load\""
echo ${FLAGS[0]} ${FLAGS[1]}


The...
9,004
Posted By vivekraj
Hai Thillai,Karthi has clearly mentioned the date...
Hai Thillai,Karthi has clearly mentioned the date format in his post itself.Did you read it fully before you answer?Thillai,I think your solution won't be correct.Because,if the day number is 30 or...
Forum: Linux 03-05-2010
8,273
Posted By vivekraj
I am using linux system and it always working for...
I am using linux system and it always working for me.
Showing results 1 to 25 of 112

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