Search Results

Search found 1507 results on 61 pages for 'spaces'.

Page 5/61 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Removing spaces from columns of a CSV file in bash

    - by vikas ramnani
    I have a CSV file in which every column contains unnecessary spaces(or tabs) after the actual value. I want to create a new CSV file removing all the spaces using bash. For example One line in input CSV file value1 ;value2 ;value3 ;value4 same line in output csv file should be value1;value2;value3;value4 I tried using awk to trim each column but it didnt work. Can anyone please help me on this ? Thanks in advance :)

    Read the article

  • Combine First, Middle Initial, Last name and Suffix in T-SQL (No extra spaces)

    - by Paul
    I'm trying not to reinvent the wheel here...I have these four fields [tbl_Contacts].[FirstName], [tbl_Contacts].[MiddleInitial], [tbl_Contacts].[LastName], [tbl_Contacts].[Suffix] And I want to create a FullName field in a view, but I can't have extra spaces if fields are blank...So I can't do FirstName + ' ' + MiddleInitial + ' ' + LastName + ' ' + Suffix...Because if there is no middle initial or suffix I'd have 2 extra spaces in the field. I think I need a Case statement, but I thought someone would have a handy method for this...Also, the middleinitial and suffix may be null.

    Read the article

  • elilo commandline boot config that includes spaces

    - by qdot
    I've got an elilo (EFI LILO) config file that includes spaces in the label - like that: image=/EFI/gentoo/boot/kernel-genkernel-ia64-3.1.6-gentoo label="Gentoo IA64 3.1.6" append="real_root=/dev/sda2" initrd=/EFI/gentoo/boot/initramfs-genkernel-ia64-3.1.6-gentoo read-only How can I select this label from ELILO's command line - the usual suspects: Gentoo IA64 3.1.6 "Gentoo IA64 3.1.6" 'Gentoo IA64 3.1.6' Gentoo\ IA64\ 3.1.6 all fail with the Kernel file not found Gentoo/"Gentoo/'Gentoo/Gentoo\" kind of error. Surely there must be a way to use a 'space' without making it a parameter delimeter?

    Read the article

  • Schedule a batch file with parameters containing spaces

    - by Danilo Brambilla
    Hi, I need to schedule a task in Windows Server 2003 that executes this script that deletes files older that n days in the specified folder. The script needs 3 parameters: %1 path to folder where files need to be deleted %2 file names (es. *.log) %3 number of days @echo off forfiles -p %1 -s -m %2 -d -%3 -c "cmd /c del /q @path" The script works fine if the first parameter has no spaces inside. This is an example of parameters that work: "C:\Program Files\SCRIPT\DeleteFilesOlderThanXDays.cmd" N:\FOLDER\FOLDER *.zip 60 This is an example that does not work: "C:\Program Files\SCRIPT\DeleteFilesOlderThanXDays.cmd" N:\Program Files\LOG *.zip 60 This does not work too: "C:\Program Files\SCRIPT\DeleteFilesOlderThanXDays.cmd" "N:\Program Files\LOG" *.zip 60 I think it would be a quotes problem but I can't figure out the solution. I'd like not to insert values directly into the script if possible Thank you all for help

    Read the article

  • Excel, Lookup special characters and spaces.

    - by Sisyphus
    I have an excel, spreadsheet that has multiple sheets. The first sheet is an index of files, I am using the following forumla to look up a value in column A, references against the index sheet, if it matches then it copies the value from column B from the index sheet. The forumla is: =IF($A3="", "", (LOOKUP($A3, INDEX!$A$3:$A$26, INEDEX!B$3:B$26))) It works for data that has no spaces and special characters, anybody have any ideas why it doesn't work and how I can make it work? Thanks in advance.

    Read the article

  • SFTP (or similar) server automated setup for group spaces

    - by spikeheap
    I need to build a dedicated machine which will be used to allow our clients to upload and download files in a secure manner. Each client has multiple users, and I would rather not hand out generic client users which are used by multiple people. Each client should have access to their files only, and no others. There is no use-case (yet) for multiple clients interacting with a single file or space. Is there an existing solution to automating the creation and maintenance of these accounts, preferably with a view to integration with LDAP? Currently it looks like if we want to use SFTP with chrooted spaces they will need to be set up manually (or an automation hand-rolled). If a solution exists for a different (but still secure) transfer method, such as FTPS, I'm all ears.

    Read the article

  • Can't get data with spaces into the database from Ajax POST request

    - by J Jones
    I have a real simple form with a textbox and a button, and my goal is to have an asynchronous request (jQuery: $.ajax) send the text to the server (PHP/mysql a la Joomla) so that it can be added to a database table. Here's the javascript that is sending the data from the client: var value= $('#myvalue').val(); $.ajax( { type: "POST", url: "/administrator/index.php", data: { option: "com_mycomponent", task: "enterValue", thevalue: value, format: "raw"}, dataType: "text", success: reportSavedValue } ); The problem arises when the user enters text with a space in it. The $_POST variable that I receive has all the spaces stripped out, so that if the user enters "This string has spaces", the server gets the value "Thisstringhasspaces". I have been googling around, and have found lots of references that I need to use encodeURIComponent. So I have tried it, but now the value that I get from $_POST is "This20string20has20spaces". So it appears to be encoding it the way I would expect, only to have the percent signs stripped instead of the spaces, and leaving the hex numbers. I'm really confused. It seems that this sort of question is asked and answered everywhere on the web, and everywhere encodeURIComponent is hailed as the silver bullet. But apparently I'm fighting a different breed of lycanthrope. Does anyone have any suggestions?

    Read the article

  • StreamWriter Problem - 2 Spaces Written as Hex '20 c2 a0' instead of Hex '20 20'

    - by Daver
    I'm writing a bunch of strings to a file using a string writer but I've discovered a problem when I look at the file created in hex, and that is that one of the spaces (x20) is replaced with a non-breaking space instead (xc2 a0) when there are 2 spaces separating words. I don't know if this is a big deal but I would like to know if there is an easy resolution to this? Here's what I'm seeing: 20 c2 a0 53 57 45 45 50 Dump = "  SWEEP" But I would like it to always be: 20 20 53 57 45 45 50 Dump = " SWEEP" Note that the c2 a0 aren't visible here but the dump looks something like 'A.' when I use the Notepad++ Hex Plugin. Does anyone have any ideas? Cheers and Thanks In Advance; -Daver

    Read the article

  • Processing files with C# in folders whose names contain spaces

    - by Nigel Ainscoe
    There are plenty of C# samples that show how to manipulate files and directories but they inevitably use folder paths that contain no spaces. In the real world I need to be able to process files in folders with names that contain spaces. I have written the code below which shows how I have solved the problem. However it doesn't seem to be very elegant and I wonder if anyone has a better way. class Program { static void Main(string[] args) { var dirPath = @args[0] + "\\"; string[] myFiles = Directory.GetFiles(dirPath, "*txt"); foreach (var oldFile in myFiles) { string newFile = dirPath + "New " + Path.GetFileName(oldFile); File.Move(oldFile, newFile); } Console.ReadKey(); } } Regards, Nigel Ainscoe

    Read the article

  • Why is QProcess converting the '=' in my arguments to spaces

    - by dagorym
    I've run into a weird error with a Qt program running on Windows. The program uses QProcess to spawn a child process wit two arguments. The program and arguments passed to the QProcess::start() method are of the form: "batchfile.bat" "--option1=some_value" "--option2=some_other_value\with_a\path" For some reason by the time those options get to the batchfile for processing the equals signs have been converted to spaces and it now looks like: "batchfile.bat" "--option1 some_value" "--option2 some_other_value\with_a\path" because of this, the processing fails. Any ideas what could be causing the equal signs to be replaced by spaces? I'm using the mingw build of the QT 4.6.3 framework found on the Qt download page.

    Read the article

  • Preserve "long" spaces in PDFBox text extraction

    - by Thilo
    I am using PDFBox to extract text from PDF. The PDF has a tabular structure, which is quite simple and columns are also very widely spaced from each-other This works really well, except that all kinds of horizontal space gets converted into a single space character, so that I cannot tell columns apart anymore (space within words in a column looks just like space between columns). I appreciate that a general solution is very hard, but in this case the columns are really far apart so that having a simple differentiation between "long spaces" and "space between words" would be enough. Is there a way to tell PDFBox to turn horizontal whitespace of more then x inches into something other than a single space? A proportional approach (x inch become y spaces) would also work.

    Read the article

  • Run batch file when argument contains quotes and spaces (from .NET framework)

    - by turtle
    I have a bat file which sets some environment variables, and then executes a command on the command line. I want to replace the hard coded command with one passed in via a parameter. So: :: Set up the required environment SET some_var=a SET another_var=b CALL some.bat :: Now call the command passed into this batch file %1 The problem is that the command is complex, and doesn't escape cleanly. It looks like this: an.exe -p="path with spaces" -t="some text" -f="another path with spaces" I'm trying to call the .bat from a .NET framework app, using: Dim cmd as String = "the cmd" System.Diagnostics.Process.Start( thebat.exe, cmd ) but I can't seem to get the escapes to work correctly. Can someone tell me how the string cmd should be entetered to get the command passed into the bat file as an argument correctly?

    Read the article

  • Perl Regular expression remove double tabs, line breaks, white spaces

    - by Scoox
    Hi guys, I want to write a perl script that removes double tabs, line breaks and white spaces. What I have so far is: $txt=~s/\r//gs; $txt=~s/ +/ /gs; $txt=~s/\t+/\t/gs; $txt=~s/[\t\n]*\n/\n/gs; $txt=~s/\n+/\n/gs; But, 1. It's not beautiful. Should be possible to do that with far less regexps. 2. It just doesn't work and I really do not know why. It leaves some double tabs, white spaces and empty lines (i.e. lines with only a tab or whitespace) I could solve it with a while, but that is very slow and ugly. Any suggestions?

    Read the article

  • Splitting a string with variable number of spaces VBA

    - by GVBA
    I have a file with a bunch of number in columns. These numbers are separated by variable number of spaces. I want to skip the first line and get all the other lines and separte each number on the line. Finally, I want to write each number on Excel. I've been able to get the lines and write them on Excel but I can't separate each number (I'm getting the whole line as one string). Does any body know how to split a string that has a variable number of spaces? Here is my code. Sub Test() r = 0 With New Scripting.FileSystemObject With .OpenTextFile("C:\Users\User\Desktop\File.tab", ForReading) If Not .AtEndOfStream Then .SkipLine Do Until .AtEndOfStream ActiveCell.Offset(r, 0) = Split(.ReadLine, vbCrLf) r = r + 1 Loop End With End With End Sub

    Read the article

  • Spaces around all hyphens in a string without double-up

    - by Dave
    I'm after a regex that puts spaces around each "-" in a string, eg. 02 jaguar-leopard, tiger-panther 08 would become 02 jaguar - leopard, tiger - panther 08 Note that if the "-" already has spaces around it, no changes are to be made, eg. 02 jaguar - leopard, tiger - panther 08 should not become 02 jaguar - leopard, tiger - panther 08 The number of hyphens are unknown in advance. Thanks for any ideas... Edit: I'm not actually using a language for this. I'm using Ant Renamer (a mass file renaming utility). There are two fields in the renamer GUI, "Expression" and "New name" to provide inputs. This is from the help file as an example: Swapping artist and title from mp3 file names: "Expression" = (.*) - (.*)\.mp3 "New name" = $2 - $1.mp3 Extract episode number and title from series video files with episode number as SnnEmm followed by title: "Expression" = Code\.Quantum\.S([0-9]{2})E([0-9]{2})\.(.*)\.FRENCH.XViD\.avi "New name" = Code Quantum - $1$2 - $3.avi

    Read the article

  • BASH Script to cd to directory with spaces in pathname

    - by Rails Newbie
    Argggg. I've been struggling with this stupid problem for days and I can't find an answer. I'm using BASH on Mac OS X and I'd like to create a simple executable script file that would change to another directory when it's run. However, the path to that directory has spaces in it. How the heck do you do this? This is what I have... Name of file: cdcode File contents: cd ~/My Code Now granted, this isn't a long pathname, but my actual pathname is five directories deep and four of those directories have spaces in the path. BTW, I've tried cd "~/My Code" and cd "~/My\ Code" and neither of these worked. If you can help, THANKS! This is driving me crazy!!

    Read the article

  • ctype_alpha but allow spaces(php)

    - by helloo
    I was wondering if one can allow spaces in a textfield when checking it with ctype_alpha. Since ctype_alpha only allows alphabetical letters, I don't know how to let the user enter space in the field. I did try using ctype_space but that didn't work. I simply want the user to be able to type only alphabets and they have a choice to include spaces if they "wish." I hope I will not have to use regexp as I am very new to all of this and hope to learn it at a later date. Below is some of the code...Thank you. elseif (!ctype_alpha($fname)) { echo "Your name may only contain alphabetical letters"; }

    Read the article

  • xml parsing takes extra spaces.

    - by SDK
    I have been trying to write/parse xml file in python. The tags are very simple <main> <data> abcdef </data> </main> I have written this xml using xml document writer from xml.dom.minidom. How-ever when i try to parse this and try to fetch data-text value, i get 'abcdef' with spaces/carriage return/newline characters in beg and end. Does parsing does not take of indenting spaces? Following is the parsing snippet (ref from net) dom = parseString(data) clipTag = dom.getElementsByTagName('clipdata')[0].toxml() clipData=clipTag.replace('<clipdata>','').replace('</clipdata>','') Kindly suggest.

    Read the article

  • CSS and JQuery: spaces inside image name break code of url()

    - by Shyam
    Hi, I have a page that is supposed to display a larger version of an image when hovered over a thumbnail. I have a 'div' with an ID and the JQuery code is as following: $(document).ready(function(){ $('img').hover(function() { var src = $("#im" + this.id).attr("src"); $('#viewlarge').css('backgroundImage','url(' + src +')'); return false; }); }); The images I use, are generated by a Ruby script that "generate" an image with a similar, yet different id. However, sometimes, photo's are uploaded that have "spaces" inside. My developer tools tell me that the background-image is not set correctly, yet the image path is correct and the browser don't have problems finding the image. My question is, can I somehow sanitize the url 'src', so spaces won't be a problem? I am aware of doing this server side, yet I would like to know how to do this with JQuery/JS too. Thanks!

    Read the article

  • how to remove the starting spaces in aucomplete feature?

    - by murali
    hi I am providing the autocomplete feature to my website....but I am facing the problem that if the user is typing at the start there are spaces(without any key)... how to limit the starting spaces without typing any keyword.....after 3 or 4 spaces it gives the starting database table keywords ... I used trim also .. but no use for( a) these spaces create a problem... how can I remove the spaces... any idea.. thanks, Murali

    Read the article

  • Why is clip space always referred to as "homogeneous clip space"?

    - by Nathan Ridley
    I've noticed in almost everything I've read so far that the term "clip space" is prepended with the word "homogeneous". Now I understand that it roughly means "all the same", but I don't understand why there is the express need to say "homogeneous clip space". When is clip space not homogeneous and why do we need to differentiate? And for that matter, what exactly does it mean that we're calling it "homogeneous clip space"? Homogenous in relation to what? In what way are the vertices "all the same"?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >