debian

Regex match a string with spaces (use quotes?) in an if statement

非 Y 不嫁゛ 提交于 2019-12-21 07:17:11
问题 How would I do a regex match as shown below but with quotes around the ("^This") as in the real world "This" will be a string that can have spaces in it. #!/bin/bash text="This is just a test string" if [[ "$text" =~ ^This ]]; then echo "matched" else echo "not matched" fi I want to do something like if [[ "$text" =~ "^This is" ]]; then but this doesn't match. 回答1: You can use \ before spaces. #!/bin/bash text="This is just a test string" if [[ "$text" =~ ^This\ is\ just ]]; then echo

Regex match a string with spaces (use quotes?) in an if statement

半城伤御伤魂 提交于 2019-12-21 07:16:08
问题 How would I do a regex match as shown below but with quotes around the ("^This") as in the real world "This" will be a string that can have spaces in it. #!/bin/bash text="This is just a test string" if [[ "$text" =~ ^This ]]; then echo "matched" else echo "not matched" fi I want to do something like if [[ "$text" =~ "^This is" ]]; then but this doesn't match. 回答1: You can use \ before spaces. #!/bin/bash text="This is just a test string" if [[ "$text" =~ ^This\ is\ just ]]; then echo

SVN error running context: An existing connection was forcibly closed by the remote host

╄→гoц情女王★ 提交于 2019-12-21 07:08:07
问题 I've created an SVN repo on my Debian Wheezy build server following this tutorial. svn --version gives 1.6.17 . Sadly, I can't commit anymore to the repo from my Windows 7 machine; it fails with the following error message: Transmitting file data .svn: E730054: Commit failed (details follow): svn: E730054: Error running context: An existing connection was forcibly closed by the remote host. I have had this error both with TortoiseSVN and the command line client. These are the contents of /var

/usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value

馋奶兔 提交于 2019-12-21 05:41:18
问题 So after doing some exhaustive research tonight on this problem, I'm still stumped. I'm running Debian Wheezy and I'm trying to get curl to support ssl, which it just plainly refuses to do. I've tried to remove all traces of OpenSSL and Curl. Then use apt-get install OpenSSL, which installs "OpenSSL 1.0.1e". I then went and tried to compile curl from source, thinking maybe apt-get was just being silly with installing curl. I tried to configure using this. ./configure --with-ssl LDFLAGS="-ldl"

Testing Crontab on Debian Ubuntu

非 Y 不嫁゛ 提交于 2019-12-21 05:04:46
问题 I will preface this by saying I am very new to command line programming with Debian Ubuntu... I have been trying to set up a crontab list on a Debian Ubuntu server but have not been able to get it to work. Here is a sample: MAILTO=myemail@gmail.com * * * * * wall test * * * * * /usr/bin/python2.6 /home/user/test.py > /home/user/clean_tmp_dir.log The above shows up when I type "crontab -l" but no resulting output appears in the console. The "test.py" is supposed to generate a csv file but none

Testing Crontab on Debian Ubuntu

家住魔仙堡 提交于 2019-12-21 05:04:05
问题 I will preface this by saying I am very new to command line programming with Debian Ubuntu... I have been trying to set up a crontab list on a Debian Ubuntu server but have not been able to get it to work. Here is a sample: MAILTO=myemail@gmail.com * * * * * wall test * * * * * /usr/bin/python2.6 /home/user/test.py > /home/user/clean_tmp_dir.log The above shows up when I type "crontab -l" but no resulting output appears in the console. The "test.py" is supposed to generate a csv file but none

“ERROR:gitosis.serve.main:Repository read access denied” when trying to clone a git repo

帅比萌擦擦* 提交于 2019-12-20 12:38:10
问题 I have one desktop PC running Ubuntu 11.04 and one Netbook running Debian 6.0.1a. I have installed and configured git as described here, on my desktop PC. I am also learning Symfony and have setup a repository for the Jobeet project on my PC. Now, when I try to clone the repository from Debian on my Netbook, I get this error: ERROR:gitosis.serve.main:Repository read access denied I have setup ssh and can easily connect to the Ubuntu from Debian with ssh. Contents of my gitosis.conf: [gitosis]

RStudio installation failure under Debian sid: libgstreamer dependency problems

随声附和 提交于 2019-12-20 10:37:59
问题 I use Debian sid (amd64), rolling updates as often as weekly. I downloaded recently the desktop version 0.99.902 of RStudio from their offical site and issued (as root, of course): dpkg -i rstudio-0.99.902-amd64.deb to no avail: dpkg: dependency problems prevent configuration of rstudio: rstudio depends on libgstreamer0.10-0; however: Package libgstreamer0.10-0 is not installed. rstudio depends on libgstreamer-plugins-base0.10-0; however: Package libgstreamer-plugins-base0.10-0 is not

Understanding Ryu OpenFlow Controller, mininet, WireShark and tcpdump

橙三吉。 提交于 2019-12-20 10:12:47
问题 I am a newbie to OpenFlow and SDN. I need help setting up the Ryu OpenFlow controller on a Ubuntu or Debian machine and understand a basic Ryu application. Note : this question already has an answer. 回答1: This is probably one of the longest posts I have written on Stack Overflow. I have been learning about OpenFlow, SDN and Ryu and would like to document my knowledge for a beginner here. Please correct/edit my post if needed. This short guide assumes you already have knowledge of computer

finding a file on linux? [closed]

[亡魂溺海] 提交于 2019-12-20 09:26:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . I am trying to find where index.html is located on my linux server, and was wondering if there was a command to do that. Very new to linux and appreciate any help I can get. 回答1: Find from root path find / -name "index.html" Find from current path find . -name "index.html" 回答2: The below line of code would do it