Questions tagged [cut]

A Unix shell command that breaks input into fields, which can be selected for output, based on a delimiter.

cut is often the easiest way to split input lines or to extract only parts from them. If the rule how to split a line into fields can be expressed with a single character, cut should be used insead of the more powerful tools sed or awk.

cut can select fixed ranges from the input line, be they bytes or characters.

The perfect match for cut is, of course, .

For Prolog's cut, see

In scientific software for statistical computing and graphics, the function cut partitions elements of a numeric vector into bins.

1687 questions
0
votes
1 answer

Parsing PSCustomObject in PowerShell, Eventlogs

So I am in need of some assistance. I got put on a project, involving writing a powershell script. And I need to be able to get the most recent SuccessAudit from the security log in a Windows 7 machine, ID=4776. I managed to get this done in a…
ShadowM82
  • 103
  • 2
  • 8
0
votes
1 answer

sorting files on bash

I have a bunch of files and would like to sort them according to their date represented in their file name as "2013-03-29_13-56-30". I am using…
Cemo
  • 5,370
  • 10
  • 50
  • 82
0
votes
2 answers

How to determine the latest stable TuxOnIce version as compactly as possible

So what I'm intending to do here is to determine the latest stable version of TuxOnIce from http://tuxonice.net/downloads/all/ (currently tuxonice-for-linux-3.8.0-2013-02-24.patch.bz2). What complicates things is that there's no "current" link, so…
Det
  • 3,640
  • 5
  • 20
  • 27
0
votes
1 answer

Accessing data from output R program

I have an output generated by the cuts functions which is the one below...lets call this ouput 'data'. cuts: [20,25) Time Kilometres 21 20 7.3 22 21 8.4 23 22 9.5 24 23 10.6 25 24 …
0
votes
3 answers

Cut Function in R program

Time Velocity 0 0 1.5 1.21 3 1.26 4.5 1.31 6 1.36 7.5 1.41 9 1.46 10.5 1.51 12 1.56 13 1.61 14 1.66 15 1.71 16 1.76 17 1.81 18 1.86 19 1.91 20 1.96 21 2.01 22.5 2.06 24 2.11 25.5 2.16 27 2.21 28.5 2.26 30 …
0
votes
1 answer

Escape @ using awk

I have the following: ssh $DOMAIN -l root "grep "'$EMAIL@$DOMAIN'" /var/log/maillog | grep retr= | grep -v retr=0 | awk '{ print "'$11'" }' | cut -d, -f1 | cut -d= -f2 | awk '{ t += $1 } END { print "'total: '", t, "' bytes transferred over…
Dan Miller
  • 13
  • 2
0
votes
2 answers

How to display only the last field?

I used cut -d " " -f 8 and awk '{print $8}' But this assumes that the 8th field is the last one, which is not always true. How can I display the last field in a shell script?
octosquidopus
  • 3,517
  • 8
  • 35
  • 53
0
votes
1 answer

Retrieving cut data in Ckeditor

I'm searching for a way to get the data of the cut event in CKEditor. And i was looking within the sourcecode posted on github. But after trying to get the data on IE8, Mozilla(Mac) with the follow 2 examples editor.editable().on('cut',…
Spons
  • 1,593
  • 1
  • 17
  • 46
0
votes
2 answers

Like Box Height Being Cut

Why is the like box bottom being cut when I set a custom height? It just cuts the faces and its lower part isn't shown. How can i fix it? Thanks
0
votes
3 answers

Cut NSString to carriage return

I have NSString example: @"Hello, Hello How are you?" I need to keep them words to transfer carriage. That is @"Hello, Hello" I have text from UIWebView. Text I get NSString *myText = [self.webview…
Alexander
  • 627
  • 2
  • 11
  • 23
0
votes
1 answer

Select part of string from text file and write it to another with powershell

i´m currently working on a script that reads out the standard printer on a workstation and write it to a textfile. Now i need to convert or cut the output string and write it to another file in order to set the cutted string as new default printer.…
0
votes
1 answer

How to handle more than multiple sets of data in R programming?

Ca data <- cut(data$Time, breaks=seq(0, max(data$Time)+400, 400))  by(data$Oxytocin, cuts, mean) but this would only work for only one person's data....But I have ten people with their own Time and oxytocin data....How would I get their…
0
votes
2 answers

Cut characters for a string in C

Here's some code. #include int main() { char npass[] = "$1$bUZXMjKz$08Ps4NPTfj6ZNkoqrsP/D."; char salt [12]; int i; for (i = 0; i < 12; i++) { npass[i+3] = salt[i]; i++; } salt[12] =…
Mangix
  • 15
  • 1
  • 3
0
votes
1 answer

Regex cut last character from expression if it has more than 4 characters

I'm looking for a way to cut the last character from a expression if it has more than 4 characters using regex e.g. 187 6 31673 9667 11857 07 after processing should look like: 187 6 3167 9667 1185 07
user2016412
  • 59
  • 1
  • 2
  • 5
0
votes
2 answers

awk capability cut capability

I am using the following ssh command to get a list of ids. Now I want to get only ids greater than a given number in the list of ids; let's say "231219" in this case. How can I incorporate that? I have a local file "ids_ignore.txt"; anyid we put…
user1934146
  • 2,905
  • 10
  • 25
  • 25
1 2 3
99
100