One of the things that I have learned to take for granted in the Win32 world is the cut, copy and paste hotkeys of ^X, ^C and ^V.
I use these keys all the time under Win32 to copy and paste information from one GUI into another GUI.
My question is, does X have a similiar standard?
... (4 Replies)
hi i am new to shell scripting,
i have been trying to cut columns numbered 1,4 of a file consisiting of 4 columns. Each column is seperated by 2 spaces.
for example:
john 6102097199 tennessee usa
michel 6734590899 texas USA
now, i need to cut the name... (3 Replies)
Hello
I have a very large file where say each line is made up of 80 characters.
I want to cut the characters from 20-30 and 50-60 from each line and then insert a delimiter between them (# or | etc).
eg
input file
000000000131.12.20990000590425246363375670011200140406... (5 Replies)
Hi i need a favour
i have a file which has some trillions of records. The file is like this
11111000000000192831840914000000000000000000000000000
45789899090000000000000000011111111111111111111111111
I want to cut specific postions in each line like cut1-3 and assisgn it to a variable and... (5 Replies)
Hello,
I want to be able to cut and paste columns from two tables in one command.
Presently I do the following:
cut -f 1,3-6,9 table1.in > table1.out
cut -f 7,6,1-3 table2.in > table2.out
paste table1.out -d '\t' table2.out > MergedTable.out
Is there a better way to do this?
... (1 Reply)
hi,
I have a file with content like this for an employee:
EmployeeID
101
Day_type, day
vacation,1/2/2009
sick day, 3/2/2009
personal day, 4/5/2009
jury duty day, 5/5/2009
how do I make the result to show:
EmployeeID,Day_type,day
101,vacation,1/2/2009
101,sick day,... (6 Replies)
Hello,
I am working on unix for the first time.
I have to write a shell script where i want to cut paste from one file to other.
File "1234.abc" is
03,12345555
16,936,x,x,120
16,936,x,x,100
49,12345555
03,12347710
16,936,x,x,115
16,936,x,x,122
49,12347710
03,12342222... (9 Replies)
I have a file which contains 3 fields separated by tabs example
andrew kid baker
I need to swap kid and baker using cut and paste commands how is this to be done?
Thanks (3 Replies)
let i have A file and B file
A has contains 4 fields as below
----------------
f1 f2 f3 f4
B file consists of 5 fields as below
--------------------
f5 f6 f7 f8 f9
need to display as below output:
f5 f1 f3 f8 f9 (2 Replies)
Hello,
I have some problem in cut or paste command for my text data.
Input1.txt :
I use cut command :
cut -d ' ' -f1 Input1.txt > result.txt result.txt :
Then, I use paste command to merge result.txt.
paste -d ' ' result.txt Input1.txt > output.txt output.txt showed :
I use cut... (1 Reply)
Discussion started by: awil
1 Replies
LEARN ABOUT ULTRIX
cut
cut(1) General Commands Manual cut(1)Name
cut - cut out selected fields of each line of a file
Syntax
cut -clist [file1 file2...]
cut -flist [-dchar] [-s] [file1 file2...]
Description
Use the command to cut out columns from a table or fields from each line of a file. The fields as specified by list can be fixed length,
that is, character positions as on a punched card (-c option), or the length can vary from line to line and be marked with a field delim-
iter character like tab (-f option). The command can be used as a filter. If no files are given, the standard input is used.
Use to make horizontal ``cuts'' (by context) through a file, or to put files together in columns. To reorder columns in a table, use and
Options
list Specifies ranges that must be a comma-separated list of integer field numbers in increasing order. With optional - indicates
ranges as in the -o option of nroff/troff for page ranges; for example, 1,4,7; 1-3,8; -5,10 (short for 1-5,10); or 3- (short
for third through last field).
-clist Specifies character positions to be cut out. For example, -c1-72 would pass the first 72 characters of each line.
-flist Specifies the fields to be cut out. For example, -f1,7 copies the first and seventh field only. Lines with no field delim-
iters are passed through intact (useful for table subheadings), unless -s is specified.
-dchar Uses the specified character as the field delimiter. Default is tab. Space or other characters with special meaning to the
shell must be quoted. The -d option is used only in combination with the -f option, according to XPG3 and SVID2/SVID3.
-s Suppresses lines with no delimiter characters. Unless specified, lines with no delimiters are passed through untouched.
Either the -c or -f option must be specified.
Examples
Mapping of user IDs to names:
cut -d: -f1,5 /etc/passwd
To set name to the current login name for the csh shell:
set name=`who am i | cut -f1 -d" "`
To set name to the current login name for the sh, sh5, and ksh shells:
name=`who am i | cut -f1 -d" "`
Diagnostics
"line too long" A line can have no more than 511 characters or fields.
"bad list for c/f option"
Missing -c or -f option or incorrectly specified list. No error occurs if a line has fewer fields than the list calls
for.
"no fields" The list is empty.
See Alsogrep(1), paste(1)cut(1)