Questions tagged [ex]

ex is a line editor which serves as the foundation of vi. ex commands work on the current line or on a range of lines in a file. ex is invoked using the colon syntax within vi, and can be invoked on its own from the shell.

75 questions
0
votes
1 answer

Excel formula if date is greater than another date

I have trouble with a dates. Don’t understand that is going on with it, some are correct and some goes wrong. I have tried change formatting, different formulas still not working correct. =IF(MONTH($M$6)&YEAR($M$6)>MONTH(N3)&YEAR(N3),"ON…
Jam_Jam
  • 47
  • 1
  • 6
0
votes
2 answers

coding e^x function using Taylor Series without using math.h and factorial function

I am making simple calculator and it is e^x function part. it works for positive number, but it doesn't for negative x. How can I make it works for negative x too?` double calculateEx(double x) { double beforeResult = 1, afterResult = 1, term = 1,…
april
  • 13
  • 2
0
votes
2 answers

Edit part of a line in text without losing other lines

I tried to replace the tstop parameter of the text from 120 to 80. What I got was a single line of text: tstop 80, losing the rest of the text. I used sed -i -rne 's/(tstop)\s+\w+/\1 80/gip' I want to change only the line tstop and keep the rest of…
Spirtoylis
  • 15
  • 4
0
votes
2 answers

Matching Two Lists Against Eachother

I have two Lists, List 1 and List 2. Both Lists have two columns, column A and column B, the values in column A(ID) & B(value) correspond with each other. I need to compare these two lists with each-other and find mismatches when they occur. What I…
Amir
  • 3
  • 1
  • 4
0
votes
2 answers

Why vim doesn't insert cyrillic symbols properly in Ex mode?

To make changes in several files I use the following script: echo search('publications.html"') | normal o
  • Книжные серии
  • echo search('collections.html"') | d echo search('photo.html"') | d wq Then I do for…
    0
    votes
    3 answers

    Working with vi buffers

    So I am learning about vim/vi/ex and I thought I had a pretty good understanding of the buffer system. (theres a gen purpose buffer and you can also name buffers). I know that anytime you use yank, change or delete, the contents of the general…
    0
    votes
    4 answers

    Copying pattern from set of lines with Vim's Ex mode

    I am tidying up my vimrc. Mission: - Copy content inside single-quotes (and preferably after the slash) - Paste them below line 1 1: Name: 2: 3: Bundle 'tpope/vim-rails' 4: Bundle 'tpope/vim-endwise' 5: Bundle 'mileszs/ack.vim' 6: Bundle…
    krystah
    • 3,587
    • 2
    • 25
    • 43
    0
    votes
    1 answer

    Execute multiple ex commands in bash shell script

    I want to execute 2 ex commands using a shell script. For example: on a file called test Print lines containing .jsp. :/.jsp/ p Add * to the beginning of those lines. :s/^/\*/ How can I make a shell script that executes them both? I've tried a…
    0
    votes
    1 answer

    vim: how to create custom command to indent and then go to next line

    Okay so I want to create a custom command (and place it in my .vimrc file using the :command command, if possible) which basically indents the line which the cursor is on and then moves to the next line. Any idea on how to do this?
    SilentDev
    • 20,997
    • 28
    • 111
    • 214
    0
    votes
    2 answers

    How to send the selected visual block in ex command line?

    I want to send a visual block as a stand-in for a command, such as :!echo < something from the visual block How could I do this in vim?
    steveyang
    • 9,178
    • 8
    • 54
    • 80
    0
    votes
    2 answers

    Regular expression for IP Address

    I need to be able to search through a log and grab IP addresses that were logged. An example log line would look like: [2012-06-05 11:59:52] NOTICE[14369] chan_sip.c: Registration from '' failed for 'yy.yy.yy.yyy' - No matching peer found I need…
    eherr9633
    • 47
    • 9
    -1
    votes
    1 answer

    How to replace quotes inside a quoted field of a non-standard CSV file using a one-liner bash command?

    I have a file like this: col1×col2×col3 12×"Some field with "quotes" inside it"×"Some field without quotes inside but with new lines \n" And I would like to replace the interior double quotes with single quotes so the result will look like…
    -1
    votes
    2 answers

    Running .exe directly & through Shell VBA returning different results

    When I click directly in the .exe file "PrintUsers.exe", the output is correct. But when I do that through VBA using Shell the result is different. It tries to find the text file in another directory. Why? See figure: SOLUTION: I am now using:…
    dmiranda
    • 3
    • 5
    -1
    votes
    1 answer

    Excel 2013 - "too many arguments" message to IFAND formula

    I am creating a decision tool where yes/no responses will trigger a follow up question or decision. I created a formula with 13 arguments where each IF has two AND conditions (if no - it is true, if yes - It is false). I am no expert and tried to…
    Sonia
    • 9
    • 4
    -1
    votes
    2 answers

    vi moving lines and words

    I am taking a UNIX class, and unfortunately my teacher is not the greatest..So I am in need of your help! I have a file named file1 with the text: Roger Mancuso Xavier Allen Paul Bibbens What our teacher wants us to do is with a single command…
    nom_nutella
    • 171
    • 1
    • 10
    1 2 3 4
    5