Displaying 20 results from an estimated 5000 matches similar to: "Off Topic bash question"
2020 Jul 23
0
Off Topic bash question
On 23/07/2020 15:46, Jerry Geis wrote:
Hi Jerry,
See below, inline, for some comments.
> I have a simple script:
> #!/bin/bash
> #
> index=0
> total=0
> names=()
> ip=()
> while read -r LINE
> do
> NODENAME=` echo $LINE | cut -f 1 -d ','`
NODENAME=$(cut -d, -f1 <<< $LINE)
Notes: use $( instead of backticks. There's no need to quote the
2004 Feb 06
1
ipfw question
Dear All.
I want to use 'not' for 2 addresses (for both) in ipfw2 rule.
The only way that looks like what I need is
# ipfw add count from IP1 to not IP2,IP3
But does this rule indeed makes what I want? Does it count all
packets destined to addresses other then IP2 AND IP3?!
No other syntax works.
For example more logically correct
not IP2 AND not IP3
or even
not { IP2 or IP3 }
are
2006 Jun 09
5
Redirect Host to Host
Hello
I have a PC with 2 IPs publics IP1 in eth0 and IP2 in eth0:0
I want to do a redirection of IP2 to an other public IP IP3 in an other
laptop (other network)
- for all ports : IP2 ---> IP3
- for juste www : IP2:www --> IP3:www
i tried many combination with shorewall-3.0.7-4, but no sucess
no help from google,
Thanks in advance
Laurent
2005 Jun 11
1
problem with ip route and multiple lans
Hi, I have a little problem to setup iproute in my network
It looks like this:
---- ----- ------
R1 R2 R3
---- ----- ------
| | |
| | |
-------------------------------
ETH1 ETH2 ETH3
ETH0 ETH4 -------------> DMZ
------------------------------
|
|
2001 May 23
1
Passing a string variable to Surv
Hi,
I am trying to write a function to automate multiple graph
generation. My data looks like:
Table of numeric values with the following headers:
timeM1 statusM1 xM1 timeM2 statusM2 xM2 timeM3 statusM3 xM3
1
2
3
4
5
6
Where M1,M2, M3 hve no similarity except they have a max string length
of 7. Examples are mcw0045, adl0003, lei0101.
Now, what I want to do is
Function(M1, M2,
2006 Jan 20
3
Selecting data frame components by name - do you know a shorter way?
Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input should look like "name1 name2 name3 ..." and the output be a data frame of those components with the corresponding names. I ´ve been trying for hours, but only found the long way to do it (which is not feasible, since I have lots of components to select):
2015 Oct 27
6
Bind DNS Issues
G'day All,
I'm running up Samba4.2.3 with 4 DCs on Centos7. There are no
changes to the default smb.conf file that gets created at provision/DC
join. "samba-tool drs showrepl" show all DC replicating in and out.
"samba-tool dbcheck" shows no errors.
See below for named.conf.
I'm having two issues.
1) After bind first starts up
2017 Jul 16
3
Arranging column data to create plots
Dear All,
I need some help arranging data that was imported.
The imported data frame looks something like this (the actual file is huge, so this is example data)
DF:
IDKey X1 Y1 X2 Y2 X3 Y3 X4 Y4
Name1 21 15 25 10
Name2 15 18 35 24 27 45
Name3 17 21 30 22 15 40 32 55
I would like to create a new data frame with the following
NewDF:
IDKey X Y
Name1 21 15
Name1
2012 Sep 10
3
How to remove last comma when iterating through hash in erb template
I need to produce a line in a config file in the format x = "ip1,ip2,ip3"
I am using the method below to sort the hash before iterating over it.
However, as you can see there will always be a final comma which breaks the
app that uses this config file. Does anyone know how I could remove the
final comma?
ipv4_bind_addresses = "<% routes.sort_by {|key, v| key}.each do |key,
2017 Jul 16
0
Arranging column data to create plots
On Sat, 15 Jul 2017, Michael Reed via R-help wrote:
> Dear All,
>
> I need some help arranging data that was imported.
It would be helpful if you were to use dput to give us the sample data
since you say you have already imported it.
> The imported data frame looks something like this (the actual file is
> huge, so this is example data)
>
> DF:
> IDKey X1 Y1 X2 Y2
2008 May 25
3
naming components of a list
Hi
I have a character vector with thousands of names which looks like this:
> V=c("Fred", "Mary", "SAM")
> V
[1] "Fred" "Mary" "SAM"
> class(V)
[1] "character"
I would like to change it to a list:
> L=as.list(V)
> L
[[1]]
[1] "Fred"
[[2]]
[1] "Mary"
[[3]]
[1] "SAM"
but I need to
2000 Oct 16
2
renaming an object
Say I have a file called exp.batch which contains 2 cols
The first col contains names of R objects the user would like to use.
The second col contains the file names which will be read in using
read.table
i.e. exp.batch may look like this.....
name1 complex/filename/path1.txt
name2 complex/filename/path2.txt
name3 complex/filename/path3.txt
name4 complex/filename/path4.txt
I want to have a
2006 Nov 29
1
Extract some character from a character vector of length 1
the content of th character vector (of length 1) is as follows:
a <- "something2 ....pat1 name1 pat2 something2....pat1 name2
pat2....pat1 name3 pat2 "
I would like to extract the character bewteen pat1 and pat2. That's to
say, I would like to get a vecter of c("name1", "name2","name3").
What I did is use strsplit() twise. But I wonder if there
2017 Jun 04
2
Warning from reshape2 when melting a data frame with uneven number of columns.
Here is a small reproducible example:
data <-
structure(list(V1 = structure(1:3, .Label = c("Name1", "Name2",
"Name3"), class = "factor"), V2 = structure(c(1L, 3L, 2L), .Label =
c("nam1",
"name-1", "name_12"), class = "factor"), V3 = structure(1:3, .Label =
c("nam2",
"nam_34",
2010 May 26
1
Xen guest does not autostart
I have a virtual machine stack which was purely Centos 5.4 the last time
I rebooted and experienced this problem: one of the guests does not
start automatically after reboot.
[root at farm1 xen]# pwd
/etc/xen
[root at farm1 xen]# ls -l auto
total 0
lrwxrwxrwx 1 root root 8 Dec 11 17:25 name1 -> ../name1
lrwxrwxrwx 1 root root 8 May 5 21:10 name2 -> ../name2
lrwxrwxrwx 1 root root 8 Nov
2010 Feb 10
4
Readjusting the OUTPUT csv file
Dear R helpers
I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and PQR, I am passing the specifications of these variables to input1.csv, input2.csv and input3.csv respectively.
This means in another case even if I
2012 Mar 17
2
Reading then transposing from file
Hi,
I'm an R beginner and I'm struggling with what should be a rudimentary task.
My data is along these lines:
ID name1 name2 name3 name4
Class 0 1 0 2
Var1 A B C A
Var2 B C C A
Var3 C A B A
etc.
I'm using the following:
foo <- data.frame(t(read.table("file", header=FALSE)))
but of course now it's not using ID, Class, etc. as column names.
As you can imagine,
2009 Jul 23
2
Constructing lists (yet, again)
This is an attempt to rescue an old R-help question that apparently
received
no response from the oblivion of collective silence, and besides I'm
also
curious about the answer
> From: Griffith Feeney (gfeeney at hawaii.edu)
> Date: Fri 28 Jan 2000 - 07:48:45 EST wrote (to R-help)
> Constructing lists with
>
> list(name1=name1, name2=name2, ...)
>
> is tedious when
2002 Jul 18
3
Oddity with names
Hi all,
I'm using R 1.5.1 on Windows 2000. The following snippet of code doesn't
seem to do anything - no error is reported, and there is no name change.
names(myFrame[,c(1:3)]) <- c("name1", "name2", "name3")
This code however works nicely:
names(myFrame)[c(1:3)] <- c("name1", "name2", "name3")
Can anyone suggest why
2010 May 13
2
need help in igraph package of R
hi
I am struck with a problem in igraph package of R. My problem is as follows
I want to plot a power law fit for my data (in .net format --- pajek format)
syntax for that in R is
g <- read.graph("filename.net", "pajek")
d <- degree (g, mode="in")
power.law.fit (d+1, 2)
it gives me desired out put if my if input a single file
but I want to use a variable