Search Results

Search: Posts Made By: rishifrnds
1,813
Posted By rishifrnds
Need list of input and output parameter of task in a text file, using shell script
//file begin =====
//some code
task abcd_;
input [1:0] x;
input [2:0] y,z; //some comment
output w; //some comment
reg [3:0 ]p;
integer q;
begin
...
1,596
Posted By rishifrnds
try sed -i.$now...
try

sed -i.$now "s/http.*.myservice.*.war/'$1'/" tempfile.xml
1,281
Posted By rishifrnds
hey, i dont know how to open a new thread ,...
hey,

i dont know how to open a new thread , hence posting here, coz my question is related.
i want to compare 2 similar files. if the contents are same then i want to echo "no new data added OR...
1,671
Posted By rishifrnds
Thanx a lot. i sat whole day and wrote below...
Thanx a lot.

i sat whole day and wrote below script

#!/bin/sh

cfg=$1
echo cfg_name=$cfg
sed 5q $cfg > cfg_header
sed -i 5d $cfg
sed -i 's/ *\/\/.*//;s/:/ /g' $cfg
sed -i '/^$/d' $cfg...
1,671
Posted By rishifrnds
i have about 1000 files, in which first 5 lines...
i have about 1000 files, in which first 5 lines are comments, rest are simple assignments.
i have to remove comments in rest of the file , leaving first 5 lines as same.

//
// name: xyz
// age...
14,085
Posted By rishifrnds
Thanks Jethrow, ur suggestion works :D ...
Thanks Jethrow, ur suggestion works :D


#!/bin/sh

a=$1
c=$2
##b=`printf "%.2f" $1*0.43`
b=`echo $1|awk '{print $0*.43}'`
##b=`echo "$a * $c"|bc`
echo $b
14,085
Posted By rishifrnds
hey, It worked :D Thank you very much...
hey,

It worked :D

Thank you very much Klashxx and Scott
14,085
Posted By rishifrnds
#!/bin/sh a=$1 b=$(echo "$a * 0.43"|bc) ...
#!/bin/sh

a=$1
b=$(echo "$a * 0.43"|bc)
echo $b

---------- Post updated at 04:04 PM ---------- Previous update was at 04:00 PM ----------

#!/bin/sh

a=$1
b=`printf "%.2f" $1*0.43`...
14,085
Posted By rishifrnds
Hi Scott, It would b great if u correct this...
Hi Scott,

It would b great if u correct this code itself and show me:

#!/bin/sh a=$1 b=$(echo "$a * 0.43"|bc) echo $b
14,085
Posted By rishifrnds
Hi Klashxx, if i try that code, it gives...
Hi Klashxx,

if i try that code, it gives error:
./test: syntax error at line 5: `b=$' unexpected
14,085
Posted By rishifrnds
Shell arithmetic : operations on decimal points
i am having a varialbe a , which is input to my file
i want to multiply this input with value .43, and assign it to variable b.
i tried it as below:

#!/bin/sh
a=$1
b=`expr $1\*0.43`
echo b=$b...
Showing results 1 to 11 of 11

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