Displaying 11 results from an estimated 11 matches for "old1".
Did you mean:
old
2011 Sep 23
4
replace multiple string
Hi
I would like to use a bash script that searches files and
subdirectories name in a directory /var/ww/html/web
for a specific string, and when it finds the search string, replaces
the string (old1) with new string (new1), and so on
old2 with new2 ....oldn with newn.
replace_string.sh
#!/bin/bash
for db in $(find /var/www/html/web -name * -exec)
do
sed -e "s/old1/new1/" \
sed -e "s/old2/new2/" \
...
sed -e "s/oldn/newn/" $db
done
Any recommendation.....
2014 Sep 02
0
unexpected behavior of <<- in nlm (lazy?)
...rsion 3.1.1 (2014-07-10) -- "Sock it to Me"
# Platform: x86_64-w64-mingw32/x64 (64-bit)
#
## AND
#
# R Under development (unstable) (2014-08-31 r66504) --
# "Unsuffered Consequences"
# Platform: i386-w64-mingw32/i386 (32-bit)
f <- function(x, a) {
cat(x[1], x.old[1], x.old1[1], x.old1 == x.old, "\n")
x.old <<- x # 'reference'
x.old1 <<- x * 1 # copy
res <- sum((x-a)^2)
attr(res, "gradient") <- 2*(x-a)
res
}
x.old <- x.old1 <- 0
A <- nlm(f, c(10,10), a = c(3,5))
10 0 0 TR...
2007 Oct 12
1
use 'lapply' to creat 2 new columns based on old ones in a data frame
There is a dataset 'm', which has 3 columns: 'index', 'old1' and 'old2';
I want to create 2 new columns: 'new1' and 'new2' on this condition:
if 'index'==i, then 'new1'='old1'+add[i].
'add' is a vector of numbers to be added to old columns, e.g. add=c(10,20,30
...)
Like this:
index old1...
2017 Dec 20
1
utils::unzip ignores overwrite argument, effectively
...it overwrites the files, anyway.
Reproducible example below.
This is R 3.4.3, but it does not seem to be fixed in R-devel:
https://github.com/wch/r-source/blob/4a9ca3e5ac6b19d7faa7c9290374f7604bf0ef64/src/main/dounzip.c#L171-L174
FYI,
G?bor
dir.create(tmp <- tempfile())
setwd(tmp)
cat("old1\n", file = "file1")
cat("old2\n", file = "file2")
utils::zip("files.zip", c("file1", "file2"))
#> adding: file1 (stored 0%)
#> adding: file2 (stored 0%)
unlink("file2")
cat("new1\n", file = "file1&...
2010 Nov 15
2
dsync mbox->mdbox: Unexpectedly lost From-line and other issues from a big conversion.
...ir
index files are completely recreatable this would just slow down thing
at the worst.
Indeed many of the errors went away, and I managed to convert about
10-20%, but then I hit another array of errors that would persist even
after restarting:
> $ grep -v Info: dsync2.log.old*
> dsync2.log.old1:dsync(user): Error: Next message unexpectedly lost from mbox file /home/user/mail/lists/mplayerhq.hu/ffmpeg-devel at 58706201 (cached)
> dsync2.log.old1:dsync(user): Error: read(msg input) failed: Invalid argument
> dsync2.log.old1:dsync(user): Error: Next message unexpectedly lost from mbox...
2011 Oct 05
4
SPlus to R
...target power
+ # cc pre-screen vector of constant c, the range should cover the
+ # the value of cc that has expected power
+ # tol1 the allowance between the expceted power and target power
+ #---------------------------
+ pc<-(0:((1-d)*nc))/nc
+ ncl<-length(pc)
+ ne.old<-ne
+ ne.old1<-ne.old
+ ### sweeping forward
+ for(i in 1:ncl){
+ cmin<-cc[1]
+ cmax<-cc[2]
+ ### fixed cci<-cmax bug
+ cci <-1
+ lhood<-dbinom((i:ncl)-1,nc,pc[i])
+ ne[i:ncl]<-(1+(cci-1)*(lhood/lhood[1])) * ne.old1[i:ncl]
+ Ep0 <-Epower(nc, d, ne, pc, alpha)
+ while(abs(Ep0[i]-power)>...
2012 Apr 04
2
Trying to merge new data set to bottom of old data set. Both are zoo objects.
Here is the data I'm working with:
http://r.789695.n4.nabble.com/file/n4530888/new.txt new.txt
http://r.789695.n4.nabble.com/file/n4530888/old.txt old.txt
My code is here:
http://pastebin.com/9jjs6Ahr
I'm looking for away to simply attach the new.txt to the bottom of old.txt
through R, else I'll just throw it in Excel to do some preprocessing. I've
looked into using merge,
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...address.
+quiet_cmd_syscall_alt = REBASE $@
+ cmd_syscall_alt = sed ''s,^\([[:space:]]*\.[[:space:]]*=[[:space:]]*\),\1-0x55AA0000 + ,'' $< >$@
+
+quiet_cmd_syscall_rel = COMPARE $@
+ cmd_syscall_rel = set -e; \
+ cmp -l $(basename $<) $< \
+ | { read off1 old1 new1; \
+ read off2 old2 new2; \
+ test $$(expr $$off1 + 1) = $$off2; \
+ echo " .long $$(expr $$off1 - 3)"; \
+ while read off1 old3 new3; do \
+ read off2 old4 new4; \
+ test $$(expr $$off1 + 1) = $$off2; \
+ test $$old1 = $$old3 -a $$new1 = $$new3; \
+...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...address.
+quiet_cmd_syscall_alt = REBASE $@
+ cmd_syscall_alt = sed ''s,^\([[:space:]]*\.[[:space:]]*=[[:space:]]*\),\1-0x55AA0000 + ,'' $< >$@
+
+quiet_cmd_syscall_rel = COMPARE $@
+ cmd_syscall_rel = set -e; \
+ cmp -l $(basename $<) $< \
+ | { read off1 old1 new1; \
+ read off2 old2 new2; \
+ test $$(expr $$off1 + 1) = $$off2; \
+ echo " .long $$(expr $$off1 - 3)"; \
+ while read off1 old3 new3; do \
+ read off2 old4 new4; \
+ test $$(expr $$off1 + 1) = $$off2; \
+ test $$old1 = $$old3 -a $$new1 = $$new3; \
+...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...address.
+quiet_cmd_syscall_alt = REBASE $@
+ cmd_syscall_alt = sed ''s,^\([[:space:]]*\.[[:space:]]*=[[:space:]]*\),\1-0x55AA0000 + ,'' $< >$@
+
+quiet_cmd_syscall_rel = COMPARE $@
+ cmd_syscall_rel = set -e; \
+ cmp -l $(basename $<) $< \
+ | { read off1 old1 new1; \
+ read off2 old2 new2; \
+ test $$(expr $$off1 + 1) = $$off2; \
+ echo " .long $$(expr $$off1 - 3)"; \
+ while read off1 old3 new3; do \
+ read off2 old4 new4; \
+ test $$(expr $$off1 + 1) = $$off2; \
+ test $$old1 = $$old3 -a $$new1 = $$new3; \
+...
2012 Nov 27
6
How to clean up /
....ko.symbols
15M /boot/kernel/zfs.ko.symbols
15M /boot/kernel.old/kernel
55M /boot/kernel.old/kernel.symbols
6.7M /boot/kernel.old/if_ath.ko.symbols
6.4M /boot/kernel.old/vxge.ko.symbols
9.2M /boot/kernel.old/xfs.ko.symbols
15M /boot/kernel.old/zfs.ko.symbols
15M /boot/kernel.old1/kernel
5M /rescue/rescue
5M /rescue/cat
5M /rescue/chflags
5M /rescue/chio
5M /rescue/chmod
5M /rescue/cp
5M /rescue/date
5M /rescue/dd
5M /rescue/df
5M /rescue/echo
5M /rescue/ed
5M /rescue/red
5M /rescue/expr
5M /rescue/getfacl...