Search Results

Search found 1174 results on 47 pages for 'escape'.

Page 26/47 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Bash command substitution not working as expected

    - by Joe Fruchey
    I'd like to view the last few lines of a file, but I want the columns aligned. Basically, I want to disable wordwrap. This is straightforward with: tail $FILE | cut -c -80 But I'm trying to generalize my script for other users, and I'd like to cut to the actual terminal width, which I can get with: stty size | cut -d" " -f2 So I would imagine that I could just tail $FILE | cut -c -`stty size | cut -d" " -f2` but it doesn't work: stty: standard input: Invalid argument cut: invalid range with no endpoint: - Try `cut --help' for more information. (Same results with the 'new' $() expansion.) Now, if I echo it, it seems fine: echo cut -c -`stty size | cut -d" " -f2` cut -c -103 Am I just missing an escape char? Or is this somehow just not possible? Thanks.

    Read the article

  • BASH function not escaping control characters

    - by ehime
    Hey guys I have a function that I'm using to find stuff, but unfortunately anytime I pass it a control character ($intVal or testing : etc) it chokes. I was wondering what the fix was? I can understand that using $ or % or : etc in grep without escaping causes this issue, but since I'm passing it in by reference I'm not sure how to escape it... Anyway, here's the code. function ffind() { if [ $1 ] ; then find -type f | grep -ir '$1' * | grep -v '.svn' else echo "'$1' is not a valid resource" fi } Example(s): $ ffind $intVal '' is not a valid resource $ ffind "testing :" bash: [: testing: unary operator expected 'testing :' is not a valid resource

    Read the article

  • Last parameter of last command in bash in vi-mode

    - by Mo
    I have been convinced (over at stackoverflow) to use my beloved bash in vi mode. So far I got used to it quite well and I like it. However I really do miss one feature: In emacs-mode, you can enter the last parameter of the previous command by pressing "ESC ." (That is, press escape followed by the .) Is there a default binding to insert the last parameter in vi-mode? I wasn't able to find one and I really miss this command... Thanks a lot

    Read the article

  • Linux for a laptop? [closed]

    - by spriteless
    I would like to install Linux on a laptop. So I have emptied the hard drive, and can boot off a CD. So far I have failed to format the hard drive to Linux, to install Linux, and to change it so that I don't have to hit escape when loading in order to boot from CD (or get Linux on the hard drive and boot to it). The old laptop has 640 MB RAM, 600*800 screen, a CD drive and USB mouse and floppy drives. I eventually mean to use it to look at PDFs if possible, or RTFs that I converted from PDFs if not.

    Read the article

  • Using ctrl-arrow keys with PuTTY and screen

    - by kbosak
    I searched and couldn't find a solution for this anywhere. I'm using PuTTY from Windows to connect to various servers where I run bash and screen. It seems bash works fine with ctrl-arrow keys to jump word-to-word on the command line but within screen it's not working. Not in screen, ctrl-left sends "^[OC and ctrl-right is "^[OD". Within screen I instead get "^[[C" and "^[[D", which appears to be the codes for just the left/right arrow keys. Is there any way to get screen to recognize ctrl-arrow keys when using PuTTY? (FYI, I don't remember having this problem when using gnu-terminal in linux instead of PuTTY). UPDATE: It appears PuTTY is the problem as it is not sending the escape codes that are necessary for this to work. I'm giving up for now and using Cygwin+mintty.

    Read the article

  • Cascade rewriting with special characters

    - by Korjavin Ivan
    I have this .htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php All queries send to index.php. In my site, I have this link: http://site/search/?v[1]=myid it work nice, I think index.php handle it. But now I want to more readable name for this link, something like http://site.si/byid_$myid.html I tried # RewriteRule ^byid_(.*).html$ search/?v\%5B1\%5D=$1 [NC,PS,NE] #escape and urlencode # RewriteRule ^byid_(.*).html$ search/?v%5B1%5D=$1 [NC,PS,NE] #urlencode # RewriteRule ^byid_(.*).html$ search/?v[1]=$1 [NC,PS,NE] #raw RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php Each of this lines kills rewriting, all requests return 500 error. Where is my fault?

    Read the article

  • Zimbra ZCS 7.2.1 MTA Deferring e-mail

    - by user139181
    Zimbra 7.1.2 and the MTA seems to be deferring e-mail when it is received. Oct 1 09:35:42 www postfix/error[16614]: 5FB8C1A803EE: to=<[email protected]>, relay=none, delay=0.15, delays=0.08/0.01/0/0.06, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to thedigiologygroup.org[75.149.56.27]:7025: Connection timed out) I can telnet to both 25 and 7025. I do get a $ telnet thedigiologygroup.org 25 Trying 75.149.56.27... Connected to thedigiologygroup.org. Escape character is '^]'. 220 thedigiologygroup.org ESMTP Postfix 500 5.5.2 Error: bad syntax 500 5.5.2 Error: bad syntax` I dont see email in the inbox obviously and I am not sure how to troubleshoot what is going on. Nothing DNS has changed. This box has been running for a year Zimbra was removed and re-installed after trying to upgrade to ZCS-8 with no luck.

    Read the article

  • Disable creation of appointment when typing into Outlook calendar

    - by Alexander L. Belikoff
    Outlook (both 2010 and 2007) has a "feature" that creates an appointment if I type some text while the calendar window has focus. This keeps biting me every now and then when I erroneously have focus on the calendar window and start typing. To me, this feature is twice as annoying: There is no easy way to escape out of it - I end up using mouse to select the newly created bogus event and then to delete it. Sometimes, if the focus is on an already existing event, such spurious typing changes the text without an easy way to undo. Question: is there a way to make Outlook stop creating/modifying events upon typing, forcing me instead to double click an event or Ctrl-N in order to process my input?

    Read the article

  • Slight delay when switching modes in vim using tmux or screen

    - by Ton van den Heuvel
    Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After pressing Esc and any other key afterwards the switch is immediate, and the command for the key pressed after Esc is executed. Any idea what might cause this? The Vim configuration is not the problem as the delay does not occur when I run Vim outside tmux, so this is probably related to tmux somehow. I use gnome-terminal btw. Also worth noting, it seems I can not define key bindings in tmux for Esc, my plan was to bind Esc to: bind Escape send-keys ^[ Alas, it seems binding anything to Esc for tmux does not work. The same problem occurs in screen as well.

    Read the article

  • Modifying a gedit syntax highlighting file

    - by Oscar Saleta Reig
    I am trying to change a highlighting file from Gedit. I have modified the file /usr/share/gtksourceview-3.0/language-specs/fortran.lang because I want to change the cases in which the editor takes a statement as a comment. The problem I have is that when I choose the new highlighting scheme nothing highlights, it just remains as plain text. The file fortran.lang was opened with su permissions and I just copy-pasted everything into a new Gedit file and later saved it as fortran_enhanced.lang in the same folder. The changes I've done to the original file are these: Original fortran.lang file: <language id="fortran" _name="Fortran 95" version="2.0" _section="Sources"> <metadata> <property name="mimetypes">text/x-fortran</property> <property name="globs">*.f;*.f90;*.f95;*.for</property> <property name="line-comment-start">!</property> </metadata> <styles> <style id="comment" _name="Comment" map-to="def:comment"/> <style id="floating-point" _name="Floating Point" map-to="def:floating-point"/> <style id="keyword" _name="Keyword" map-to="def:keyword"/> <style id="intrinsic" _name="Intrinsic function" map-to="def:builtin"/> <style id="boz-literal" _name="BOZ Literal" map-to="def:base-n-integer"/> <style id="decimal" _name="Decimal" map-to="def:decimal"/> <style id="type" _name="Data Type" map-to="def:type"/> </styles> <default-regex-options case-sensitive="false"/> <definitions> <!-- Note: contains an hack to avoid considering ^COMMON a comment --> <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check"> <start>!|(^[Cc](\b|[^OoAaYy]))</start> <include> <context ref="def:escape"/> <context ref="def:in-line-comment"/> </include> </context> (...) Modified fortran_enhanced.lang file: <!-- Note: changed language id and name --> <language id="fortran_enhanced" _name="Fortran 95 2.0" version="2.0" _section="Sources"> <metadata> <property name="mimetypes">text/x-fortran</property> <!-- Note: removed *.f and *.for from file extensions --> <property name="globs">*.f90;*.f95;</property> <property name="line-comment-start">!</property> </metadata> <styles> <style id="comment" _name="Comment" map-to="def:comment"/> <style id="floating-point" _name="Floating Point" map-to="def:floating-point"/> <style id="keyword" _name="Keyword" map-to="def:keyword"/> <style id="intrinsic" _name="Intrinsic function" map-to="def:builtin"/> <style id="boz-literal" _name="BOZ Literal" map-to="def:base-n-integer"/> <style id="decimal" _name="Decimal" map-to="def:decimal"/> <style id="type" _name="Data Type" map-to="def:type"/> </styles> <default-regex-options case-sensitive="false"/> <definitions> <!-- Note: I want comments only beginning with !, not C --> <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check"> <start>!</start> <include> <context ref="def:escape"/> <context ref="def:in-line-comment"/> </include> </context> (...) I have read this question [ Custom gedit Syntax Highlighting for Dummies? ] and I tried to make the new fortran_enhanced.lang file readable with $ cd /usr/share/gtksourceview-3.0/language-specs $ sudo chmod 0644 fortran_enhanced.lang but it doesn't seem that made some difference. I have to say that I have never done a thing like this before and I don't even understand most of the language file, so I am open to every criticism, as I have been guided purely by intuition. Thank you in advanced!

    Read the article

  • How to statically configure DNS servers on a Cisco router when the WAN interface uses DHCP?

    - by Massimo
    I have a Cisco router (model 887VA, IOS 15.4) used to connect a LAN to the Internet via ADSL. The WAN interface uses DHCP: interface ATM0.1 point-to-point ip address dhcp I need the router to use a statically-defined DNS server for name resolution: ip name-server A.B.C.D However, the router insists on using the DNS servers supplied by the ISP via DHCP: Router#ping www.google.com Translating "www.google.com"...domain server (<ISP DNS>) [OK] Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 173.194.116.208, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 44/45/48 ms How can I tell the router to ignore the ISP-supplied DNS servers and only use the statically-configured one?

    Read the article

  • Dovecot immediately logs off user

    - by nona urbiz
    I'm trying to set up email on my server, and have successfully set up POP3 with gmail for my main account. When attempting to set up another user though, gmail reports ` There was a problem communicating with dylanstestserver.com. I can't figure out why it's working for me and not the other users. I do receive email sent to the address on the server. One suggestion I found online was to try logging in over telnet, but strangely, it kicks me off right after I log in. dylan~$ telnet dylanstestserver.com 110 Trying 50.16.219.8... Connected to dylanstestserver.com. Escape character is '^]'. +OK Dovecot ready. user dylanstestemail +OK pass password +OK Logged in. Connection closed by foreign host. thanks for any ideas and help

    Read the article

  • Can't run Ubuntu from disc

    - by alex
    When I place the boot CD in my CD drive and boot from it, I get the Ubuntu menu. I have these options Try Ubuntu without any change to your computer Install Ubuntu Check disc for defects Test memory Boot from first hard disk I can use the cursor keys to select them, and I can push F1 for help etc. However, I can not select an option. I've highlighted the first and tried enter, space bar etc. I do have a KVM, so I plugged in a 2nd USB keyboard and tried it but no go either. I can push escape and then got to the prompt. Am I doing something wrong?

    Read the article

  • Forwarding ports with ssh on Linux

    - by Patrick Klingemann
    I have a database server, let's call it: dbserver I have a web server with access to my dbserver, let's call it: webserver I have a development machine that I'd like to use to access a database on dbserver, let's call it: dev dbserver has a firewall rule set to allow TCP requests from webserver to dbserver:1433 I'd like to set up a tunnel from dev:1433 to dbserver:1433, so all requests to 1433 on dev are passed along to dbserver:1433 My sshd_config on webserver has the following rules set: AllowTcpForwarding yes GatewayPorts yes This is what I've tried: ssh -v -L localhost:1433:dbserver:1433 webserver In another terminal: telnet localhost 1433 Results in: Trying ::1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. Any idea what I'm doing wrong here? Thanks in advance!

    Read the article

  • How do I keep the URL in the address bar when stopping page load in Firefox

    - by Peter Jaric
    Suppose I am visiting a page in Firefox and decide to go somewhere else and type the new URL manually into the address field, but the page fails to load, either because it times out, or because I hit Escape. Then Firefox removes my laboriously entered URL and replaces it with the URL of the current page. This is outrageous! I am pretty sure Firefox has changed this behavior lately, because this was one of the reasons I chose Firefox over IE back in the day. How can I turn off this annoying behavior? OS: Windows 7 Firefox version: 22

    Read the article

  • PHP failing to connect to GMail via IMAP [Edited!!]

    - by Alexander
    I have some php code that I'm trying to use to connect to gmail using imap. Here's the code: $hostname = '{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX'; $tmp_username = 'username'; $tmp_password = 'password'; $inbox = imap_open($hostname, $username, $password) or die(imap_last_error()); And I get this error output everytime i try to connect: Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX in /var/www/PHP/EmailScript.php on line 14 Login aborted I dont understand what could be wrong!! I've heard of people having SSL errors but this doesnt seem to be one of those. Please please please help me!!!!! Edit: When trying to connect to imap.gmail.com through telnet-ssl i get the following output: Trying 74.125.155.109... Connected to gmail-imap.l.google.com. Escape character is '^]'. And Nothign else happens

    Read the article

  • How to get ~/foo from /home/user1/foo?

    - by Claudius
    The Bash prompt supports the \w escape sequence, documented as \w the current working directory, with $HOME abbreviated with a tilde (uses the value of the PROMPT_DIRTRIM variable) Is there any way to get a similar abbreviation for an arbitrary string? That is, is there a general command that does something like the following, provided that HOME=/home/user1 /home/user1 ? ~ /home/user1/a/1 ? ~/a/1 /home/user2/b/2 ? ~user2/b/2 /root ? ~root Sure, I could try something ugly with sed, but that is unlikely to give me the result I want in any case. :-) The movitation behind this is that I would like to keep the titles in the tabs of my terminals as short as possible, hence abbreviate working directories where possible.

    Read the article

  • Secure Apache Virtual Hosts?

    - by Dr Hydralisk
    I am going to host a few small sites on VPS, and each of them are going to run my own custom PHP scripts. I am fairly certain that they are secure (did everything in the book, plus some of which is not in the book) to make sure they can't be exploited. But just to be safe I want to know how I could secure each of the virtual hosts so that they can't escape from there virtual host (if a hacker uploaded a shell they could not go above the www folder a legitimate user can't do in ftp no matter how many times they click ..) folder on Debian and Apache.

    Read the article

  • postfix and chdir domain.com/admin/ failed

    - by senzacionale
    root@ubuntu-server:/var/log# telnet localhost 110 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. +OK Hello there. user [email protected] +OK Password required. pass MyPasswd -ERR chdir domain.com/admin/ failed Connection closed by foreign host. and mail.log Apr 24 12:36:41 ubuntu-server pop3d: Connection, ip=[::ffff:127.0.0.1] Apr 24 12:36:58 ubuntu-server pop3d: chdir domain.com/admin/: No such file or directory what can i do? how to set up this directories? MX records are set, domain is set,...

    Read the article

  • Apache Subversion and Sudo - Why can't I resolve this hostname?

    - by Hollowsteps
    Okay, I made a mistake and I'll be the first to admit I'm new at this setup. I built a bare bones kit, installed Ubuntu on it, and attempted to set up a source control server for a project some friend and I were going to work on. Unfortunately, I screwed up. I followed a dodgy tutorial from 2005 and when it didn't work, started mixing and matching trying to get to the source of my problem. So now I sit before you, a broken and miserable man. Desperate to escape this annoying echo of 'Unable to resolve host computer.repositoryname.com', I uninstalled apache and subversion. That did not fix it. Next I tried to edit my /etc/hosts, going so far as to remove the reference to '127.0.1.1 computername'. Still I'm plagued. I know I messed up, is there any way to track down this wayward bug?

    Read the article

  • tmux: unbind C-[ as a prefix

    - by StanAngeloff
    I have a fairly straight forward .tmux.conf file which does nothing more but to define a couple of options, such as history-limit. I have not added any custom key bindings yet. I find it extremely annoying that I cannot unbind C-[ as a prefix in tmux. Here is what I mean: $ uname -a Linux stan-inspiron 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ tmux [0] 0:~* "stan-inspiron" 10:05 12-Jun-12 % vim Whilst inside vim, when I go to insert mode and then use C-[0 to escape insert mode and move to the first character on the line, tmux grabs the key first and complains: Window not found: :0 ** I tried all sorts of things in my .tmux.conf, but nothing works. I thought it might be a terminal or shell issue, but confirmed same behaviour on a configless machine using Bash and [Gnome] Terminal. So the question really is, how do I unbind the C-[ key from tmux? ** I have base-index 1 set.

    Read the article

  • Why doesn't tmux respond to shortcuts properly?

    - by Marc
    I'm using OSX 10.8.1 in combination with iTerm2, zsh and tmux via Homebrew. The beginning of my ~/.tmux.conf file looks like this: set -g prefix C-a unbind C-b bind-key a send-prefix set -sg escape-time 1 When I start tmux and press C-a c, nothing happens. When I spam C-a c fast enough then some new tabs open up, but not the equivalent count of my command spaming. When I press C-a first followed by c, nothing happens again. Is there a delay issue or what's up with my tmux installation/configuration?

    Read the article

  • SSH from Windows hangs when using insert mode in vim on Dreamhost: Why?

    - by cletus
    I have SSH set up using Cygwin on Windows XP SP3 to Dreamhost. It works fine except that when I edit a file with vi and use insert mode (eg press 'i' and type in some stuff). I then try and hit escape and ZZ to save/exit and it hangs instead. My edits aren't saved and I have to kill the session (locally) and kill the vi process on Dreamhost. This is highly annoying. It's not reliable either. Sometimes it does work. Also, this happens with PuTTY too.

    Read the article

  • check_ssh executed from Nagios server returns "Server answer: ", nothing else

    - by phs
    Commmand works on the host I need to monitor (its IP is denoted as $HOSTADDRESS$ here): [root@host ~]# /usr/local/nagios/libexec/check_ssh localhost SSH OK - OpenSSH_4.3 (protocol 2.0) However, on the Nagios server, it does not: root@server:~# /usr/lib/nagios/plugins/check_ssh -H $HOSTADDRESS$ Server answer: I can see that the port is open: root@server:~# /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 22 TCP OK - 0.123 second response time on port 22|time=0.123277s;;;0.000000;10.000000 And I can verify with telnet: root@server:/etc/nagios3/conf.d# telnet $HOSTADDRESS$ 22 Trying $HOSTADDRESS$... Connected to $HOSTADDRESS$. Escape character is '^]'. After searching the web for two hours and trying different suggestions I am out of ideas. I have several other hosts with similar setup, and they don't have this problem. I have compared the configs and they look the same (I think). I am clearly missing something here.

    Read the article

  • Keyboard Pressing Application

    - by Click Ok
    Imagine that problem. When you play some games, sometimes happens situations like "press quickly the X key to escape from ropes" or "press quickly the X key to fill the rage gauge", etc. Of course, that kind of game destroy keyboards, joysticks, mouses, etc. I would like to know about programs (preferentially free) that, by example, will press the 'x' key in intervals of, by example, 300ms. Remember that the built in Windows "keyboard repeat rate" doesn't works for games. When you press (and hold) somekey in the game, the key is not repeated as in default Windows Applications. Thanks!

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >