The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
25 views

String Manupulation in VBA

I have single column that needs to be split to multiple, like Text-to-columns in excel. However there is a small challenge. Conventional delimiter will not work. Consider the string below Original: ...
0
votes
2answers
34 views

How to find number of `_`-separated words?

I want to make a Unix command that reads a string and counts how many words it contains. In my case the words are separated by a _ (underscore) character, not spaces. For example, TABLE_PERSON ...
0
votes
1answer
41 views

how to extract last number sequence in an IP Address (using Linux)

I want to extract the last digits of an IP Address based on the result of ifconfig command. ifconfig often includes a whole heap of output so I'm not really sure how to get the digits that I want. ...
1
vote
2answers
72 views

Why doesn't grep work with single quotes?

I have a bash script wrapped in " " so I need to use ' ' for my grep command but it doesn't work. I can't switch the quotes because then the variables are not expanded. #!/bin/bash PWD=`pwd` source ...
3
votes
2answers
3k views

function to automatically remove special characters from file names during saving in MacOS X

I'm often creating PDF files from web pages in MacOS X (10.6) and very often I have the problem that the automatically proposed file name (based on the name of the web page) contains many special ...
3
votes
1answer
54 views

How can I do string manipulation in fish shell

How can I do bash style string manipulations in Fish shell? Specifically, in bash read branch < ".git/HEAD" branch=${branch#ref: refs/heads/} will put the branch name in $branch variable. How ...
5
votes
4answers
6k views

How to create a random string of random length from the alphabet?

I want to create a random string with random length from the alphabet in Excel. For example, "jlskdjf", "kjlk", "kljsodif", etc. How can I do that?
0
votes
1answer
44 views

Extract part of a cell's text

I have text values in 10's of thousands of cells. I want to pull off the "prefix" and put it in a separate column. We have a delimiter, guaranteed, of a hyphen with spaces around it to help pick off ...
0
votes
1answer
143 views

What SQL can be used to extract a first and last name from a mixture of name fields

Name field can be a mixture of formats, for example: Mr. First Last, Mr First Last, First M Last, First M. Last, First Last Snr, First M Last Snr, First Last-Last, etc.
0
votes
1answer
352 views

How do I append dynamic number of spaces at the end of a string in a batch file

I want to output information to a log file as such 01/08/2013 14:30 - Dynamic-Machine-Name - Message starts 02/08/2013 07:12 - DynamicMachineName - Log entry 02/08/2013 07:14 - ...
0
votes
2answers
356 views

Excel string extract

I have a string in a cell: ABCDxxxxxEFGH ABCD and EFGH are constants, and xxxxx is of variable length. How do I write an Excel formula to extract xxxxx?
2
votes
3answers
241 views

Counting frequency of comma-delimited tags in Excel

I have an excel spreadsheet with a list of seminars and classes that students have taken that (when abridged) looks like: (A)___ClassName________|(B)_________Tags____________| Astrobiology ...
0
votes
0answers
53 views

How to 301 redirect a set of links containing a specific word in a string

I am trying to find a way to redirect http://www.windoorsa.com/products?option=com_virtuemart&page=shop.product_details&only_page=1&product_id=3540&pop=1&tmpl=component& where ...
1
vote
2answers
172 views

How to pass a formula as one of the arguments to CONCATENATE?

I'm using Microsoft Excel 2010 and I am trying to create a title which will be updated every time the spreadsheet is opened. I want it to say "Forecast from (today's date) until end of 2013". So far ...
0
votes
1answer
138 views

Extracting delimited substring in Excel

I started with this question, but it doesn't quite address my needs. I have a series of filenames in a worksheet. Some of the filenames have cross-references enclosed in square brackets. Consider Foul ...
0
votes
1answer
485 views

Delete a character from an argument passed to a batch file

Suppose in a batch file, say receive.bat, is called with some arguments. Now receive.bat executes and it needs to process these arguments. Sometimes (but not always), an argument will end with a ...
3
votes
3answers
23k views

Any Excel function that will reverse a string?

Are there any built-in Excel functions that will reverse a string?
1
vote
2answers
212 views

UNIX string comparing in large file

I have a large text file with over 75 Million records. Each record consists of string tokens (attributes) and between each token there is a tab character. This is an example of two records: 43 ...
3
votes
1answer
101 views

Linux shell scripting: unexpected variable behavior

I have a variable $myvar that contains two lines, and I want to put first of them into a new variable. When I try: $ myvar1 = $(echo $myvar | head -n 1) It doesn't work because echo doesn't ...
1
vote
1answer
550 views

Remove URL Parameter in Excel

I have a URL of the following form: http://www.example.com/page.html?param1=asdf&param2=asdfg&param3=asdfgh I want to extract the value of param2 or 3 from the URL as well as remove that ...
3
votes
2answers
655 views

Bash prefix string with tilde to expand to home directory

I can't figure out how to prefix a string (e.g. "user1") with a tilde (~) to produce ~user1 and have that expand to user1's home directory. Here is what I have now: USER="user1" ls ~${USER} ls: ...
2
votes
1answer
367 views

How to calculate and group the time differences of specified syscalls when running strace

I'm planing to do some web performance testing (to see how much time it's spent for each file), but it could be useful for any application. I exactly know existence and how to use different ...
2
votes
1answer
768 views

Bash string concatenation, do not expand wildcard

Background: I have a script which takes a filename as a parameter, for example "mydb.sql". My script imports this DB and "cleans" it (removes user identifiable data, etc), exports it and then creates ...
1
vote
4answers
377 views

How to extract two numbers from two strings and calculate the difference in Bash?

I have a text file which contains (among others) the following lines: {chapter}{{1}Einleitung}{27}{chapter.1} {chapter}{{2}Grundlagen}{35}{chapter.2} How can I get the 2 lines from this text ...
1
vote
2answers
209 views

String manipulation of type String substitution in mathematical expression

Imagine something like exp(49/200)+(x-49/200) I want to pass as argument of the function "roundn" whatever operation that is not an addtion or a subtraction So my expresion became ...
1
vote
1answer
159 views

Get part of script run directory in bash

I'm running a Bash script that's buried in a directory on my system. I need to be able to get the first section of the directory path. The path returned by $0 in my script is as below. The ...
2
votes
4answers
1k views

How do I do a string replace in all PHP files recursively on Linux?

I have a function name that was misspelled, and I want to change it. The function is called in many places of the project. How can I do this with a Linux command on SUSE?
0
votes
2answers
647 views

What the best program for string manipulation [closed]

I would like to know the best program (Surely a text editor) to make string manipulation like string substituion. By the way, I would like to do the next: String manipulation of type String ...
0
votes
2answers
560 views

VI make every first letter that comes after a underscore uppercase

Found this site: http://unix.t-a-y-l-o-r.com/VMswitch.html And it works for the first character but my lines are line this this_is_a_string And I would like this This_Is_A_String Any ...
1
vote
1answer
82 views

Tool to manipulate text in web form fields?

I'm looking for a way to manipulate text in form fields. For example, if I have a large textarea "body" field, from my browser I want to be able to highlight a piece of text in that textarea, for ...
0
votes
1answer
985 views

How can I format a text field in Microsoft Access Report Designer?

I have a field (a string) that looks like this: '0000000840509001' when printed on my report. I want it to look like this: '84-05-090.01'. Is there any way to do this at the report design level? ...
1
vote
2answers
1k views

Shell: Find and replace word

I have a string in my shell script which is in a fixed format : '[STATUS REPORT] PROJECT'. When user executes my shell script he will be asked to provide a value for 'PROJECT'. I would like to ...
1
vote
1answer
3k views

Delete all occurences of any word matching a partial string in sed

Assume that I have the following line: group blue:green yellow green redtomblue black !greyTOMwhilte !purple redblue I need to delete from it all words that contain the string "tom" or "TOM" using ...
0
votes
2answers
3k views

Extract emails from gmail

I have a website with a contact form. Once the user fills in the form, an email is being sent to my gmail in the following syntax: From: Contact us form <contact-us-form@example.com> ...
3
votes
1answer
831 views

Reverse Name order in Notepad++

I have a load of names in a file in the format Lastname, Firstname: Williams, Hywel Williams, MarkĀ  Williams, Roger Williams, Stephen ... Is there a simple way of reversing them in ...
0
votes
2answers
17k views

How to extract part of a string, in Windows batch file?

If I have a variable in a batch (cmd) file that looks like "Abc_123", and I want to end up with a variable that has just "123", is there any built-in way to do this? I'm not terribly picky about the ...
1
vote
2answers
2k views

How to convert a single line of Hex numbers into a multi-row Excel table?

I'm currently at some hex strings in a video game's data files. The structure is: XX 01 YY YY (then repeats) Where: XX is the item's cost 01 is unknown (it won't matter) YY YY is the item's ID. ...
1
vote
1answer
714 views

Replace cell formatting with text in Excel?

I received an Excel document that has data that looks like the following: A B C ========================================= 1 |F:\folderName | | | 2 ...
1
vote
3answers
899 views

How Do I Parse a String?

I am new to bash, and I am creating a script that loops through the files in a directory and based on part of the filename, does something with the file, so far I have this: #!/bin/bash ...