Displaying 10 results from an estimated 10 matches for "old2".
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..
Thanks
pons
2010 Nov 15
2
dsync mbox->mdbox: Unexpectedly lost From-line and other issues from a big conversion.
...sync2.log.old1:dsync(user): Error: Next message unexpectedly lost from mbox file /home/user/mail/lists/gnupg.org/gnupg-users at 6507197 (cached)
> dsync2.log.old1:dsync(user): Error: Unexpectedly lost From-line from mbox file /home/user/mail/lists/gnupg.org/gnupg-users at 6486645
> dsync2.log.old2:dsync(user): Error: mdbox /home/user/mdbox/mailboxes/lists/mplayerhq.hu/ffmpeg-devel/dbox-Mails: map uid lost for uid 26483
> dsync2.log.old2:dsync(user): Error: msg guid lookup failed: Internal error occurred. Refer to server log for more information. [2010-11-15 02:36:21]
> dsync2.log.old2:...
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 old2 new1...
2011 Oct 05
4
SPlus to R
...alpha)
+ while(abs(Ep0[i]-power)>tol1){
+ if(Ep0[i]<power) cmin<-cci
+ else cmax<-cci
+ cci<-(cmax+cmin)/2
+ ne[i:ncl]<-(1+(cci-1)*(lhood/lhood[1])) * ne.old1[i:ncl]
+ Ep0<-Epower(nc, d, ne, pc, alpha)
+ }
+ ne.old1<-ne
+ }
+ ne1<-ne
+ ### sweeping backward -- ncl:i
+ ne.old2<-ne.old
+ ne <-ne.old
+ for(i in ncl:1){
+ cmin<-cc[1]
+ cmax<-cc[2]
+ ### fixed cci<-cmax bug
+ cci <-1
+ lhood<-dbinom((ncl:i)-1,nc,pc[i])
+ lenl <-length(lhood)
+ ne[ncl:i]<-(1+(cci-1)*(lhood/lhood[lenl]))*ne.old2[ncl:i]
+ Ep0 <-Epower(nc, d, cci*ne, pc, alpha)...
2017 Dec 20
1
utils::unzip ignores overwrite argument, effectively
...mple 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")
readLines("file1")
#> [1] &quo...
2003 Mar 10
2
Creating a sequence of variables in a data frame
Two questions:
1. I have a data frame named "data1" that includes the variable "old". I want to create a sequence of new variables in the data frame called "old.1", "old.2", ... . I''ve tried a few "paste" commands, and creating a new data frame of the new variables, all to no avail. Any advice?
2. If I have a variable in a data
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...= 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; \
+ test $$old2 = $$old4 -a $$ne...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...= 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; \
+ test $$old2 = $$old4 -a $$ne...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...= 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; \
+ test $$old2 = $$old4 -a $$ne...
2017 Mar 01
0
NetworkManager and Half DHCP not work correct - second time.
...and searchserver manual)
3. order was correct inside the config, but in seperated network
configs:
PEERDNS=yes ?????
5. DNS Server where in wrong direction in the consol.
4. I changed the PEERDNS entry at home manually.
Reboot. Everything works as expected, nameserver in right order (NEW,
OLD, OLD2).
At my office i deleted every adapter and rearrange it.
Strange, but true.
Sincerely
Andy
PS: Don't tell me disable NetworkManager. I know both work out. :-)