Search Results

Search: Posts Made By: paramad
Forum: Ubuntu 12-28-2010
23,159
Posted By pludi
It should be somewhere in /usr/lib/jvm if I...
It should be somewhere in /usr/lib/jvm if I remember correctly. However, most IDEs for Java can auto-detect that pretty well.
18,980
Posted By anurag.singh
if following prints 'sat' or 'unsat' as output on...
if following prints 'sat' or 'unsat' as output on screen

./yices < file1.ys

then do following

a=$(./yices < file1.ys) #store output in variable a
echo $a > outputFile #store output (value...
18,980
Posted By anurag.singh
Right. That's what above script is doing. It's...
Right. That's what above script is doing.
It's reading Data.txt and putting 1st column value in a , 2nd column value in b and 3rd column value in c.
Then all occurences of b in file1 is being...
18,980
Posted By anurag.singh
Below Regular expresion tells that single quote...
Below Regular expresion tells that single quote may appear ZERO (means not there at all) OR ONE time.
[']\{0,1\}
This is to read F1 OR F1' in variable a
F1 1
F1' 1
18,980
Posted By anurag.singh
cat Stack.txt Output.txt > Data.txt while read...
cat Stack.txt Output.txt > Data.txt
while read a b
do
sed -i "s/$a[']\{0,1\}/$b/g" file1
done <Data.txt
Yes. a, b ,c are variables.
If only two columns, then remove 3rd variable c.
Now all...
18,980
Posted By anurag.singh
In while read a b a is first string...
In

while read a b

a is first string (i.e. OUT) and b is 2nd string (i.e. 0)
and in

sed -i "s/$a/$b/g" file1

$a will be replaced by $b

If you don't have file2, file3, ..., file50...
18,980
Posted By anurag.singh
If you have too many files like file2,...
If you have too many files like file2, file3,....file50
Then all above files can be concatenated into one say a temp file..
then use temp file and change values in file1.
Then go with ctsgnb in...
18,980
Posted By ctsgnb
maybe something like this ? while read a b do...
maybe something like this ?
while read a b
do
sed "s/$a/$b/g" file1 >output
cat output >file1
done <file2

or
while read a b
do
sed -i "s/$a/$b/g" file1
done <file2
18,980
Posted By anurag.singh
key=$(awk '{print $1}' file2) value=$(awk...
key=$(awk '{print $1}' file2)
value=$(awk '{print $2}' file2)
sed -i "s/$key/$value/g" file1
6,017
Posted By rikxik
You should be using "grep" instead of "sed" for...
You should be using "grep" instead of "sed" for this purpose. Anyway, this works for me:


$ cat emp.lst
john reed
peter sullivan
pete blake
rob turner
$ cat em.sh
#!/usr/bin/bash

echo -e...
4,080
Posted By
$ split -l 5 FILE.TXT spl This will split...
$ split -l 5 FILE.TXT spl
This will split FILE.TXT in spla and splb as below.
$ cat spla
(define argc :: int)
(assert ( > argc 1))
(assert ( = argc 1))
<check>
#
$ cat splb
(define c ::...
4,080
Posted By
I am not aware of the yices tool. So, I don't...
I am not aware of the yices tool. So, I don't have the exact idea how its output is gonna look like. If its very large amount of data than I would prefer u to store output in file rather than in...
4,080
Posted By
Yes it will split whole file like spla, splb,...
Yes it will split whole file like spla, splb, splc, spld,.....till applicable.

split -l 5 FILE.TXT spl
yices < `ls spl* | xargs`
Showing results 1 to 13 of 13

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