dos equivalent of "cut" command?

dos equivalent of "cut" command?

Post by Amey » Fri, 24 Aug 2007 22:49:38


Hello,

I am trying to cut a specific column from a piece of text that I get
as an output through piping. I know that in Linux the "cut" command
does the trick but I do not know what is the command for that in DOS
or if I can do it in dos command line. It would be great if anyone can
help me in this.

The command is as follows:

type abc.txt | find "Hello" | (I don't know what command to use to cut
a specific column)

Thanks in advance

Regards,
Ameya
 
 
 

dos equivalent of "cut" command?

Post by Robert Rie » Fri, 24 Aug 2007 23:21:38


A 16-bit `cut' for DOS is here:
http://www.yqcomputer.com/

--
Robert Riebisch
Bitte NUR in der Newsgroup antworten!
Please reply to the Newsgroup ONLY!

 
 
 

dos equivalent of "cut" command?

Post by Matthias T » Sat, 25 Aug 2007 00:52:56


You are posting from wndows XP, so you might take "for /f" for column parsing.
See for /?

Or since you are used to use cut - use cut ;-) via cygwin or a windows port
like in unxutils http://www.yqcomputer.com/

--
Greetings
Matthias
 
 
 

dos equivalent of "cut" command?

Post by Ted Davi » Sat, 25 Aug 2007 05:49:49


cut for Windows, and when you say DOS, I assume you mean Win32, is part
of the CoreUtils package from GnuWin32:
< http://www.yqcomputer.com/ ;.


--
T.E.D. ( XXXX@XXXXX.COM )
 
 
 

dos equivalent of "cut" command?

Post by Terenc » Sat, 25 Aug 2007 08:14:01

As I read your posting, you have ended up with a block of ascii text
as a result of piping operationes from DOS command line instructions.

You want to eliminate a column from the lines of resulting text (i.e.
the nth character in each row line)..

I use WORDSTAR exclusively, and I can do what you want by first
switching on column mode editing with ^KN (a toggle), then select the
column or columns with ^KB before the first column on the first line
and ^KK after the end column on the last line to be affected.
.
Then I can cut the block of columns with ^KY, or cut and paste with
to somehwere else with ^KV.

These facilities are also in Vedit.
 
 
 

dos equivalent of "cut" command?

Post by Ted Davi » Sat, 25 Aug 2007 10:14:24


And in UltraEdit and many other editors that are equally useless in a
batch file or from the command line.

Personally, I almost always use a text editor (UltraEdit) for column and
awk scripts for field isolation.

--
T.E.D. ( XXXX@XXXXX.COM )
 
 
 

dos equivalent of "cut" command?

Post by Amey » Sat, 25 Aug 2007 17:34:20


Hello Everyone,

Thank you for your replies. I have downloaded Cygwin and I can use all
the unix commands in windows environment now.

Regards,
Ameya
 
 
 

dos equivalent of "cut" command?

Post by Ted Davi » Sat, 25 Aug 2007 21:54:53


Be aware that Cygwin, while useful, is not a real solution in the Windows
environment - for one thing, some of the utilities are not up to current
feature standards (I recently got bitten by Cgwin's head which doesn't
recognize the byte offset switch). The real solution is the GnuWin32
collection of utilities. These are native Windows programs and use
Windows conventions (mostly) for file names and the like. If you need
bash, use Cygwin, otherwise use the GnuWin32 utilities (the ones that
don't work in windows mostly don't work in Cygwin either because the
problem is lack of support in the underlying operating system).


--
T.E.D. ( XXXX@XXXXX.COM )
 
 
 

dos equivalent of "cut" command?

Post by Alejandro » Fri, 31 Aug 2007 09:03:14

n 2007-08-23, Ameya < XXXX@XXXXX.COM > wrote:
A very good shareware Dos text editor that can cut columns is Boxer:

BOXER is a remarkably full-featured text editor which has quickly become
the favorite of all types of computer users: programmers and writers,
power users and novices. BOXER is the result of a 10-year effort by a
self-proclaimed perfectionist, and the outcome is a highly polished
software program. Attention to detail is apparent throughout: BOXER's
interface is smooth, intuitive and courteous. Designed with an emphasis
on flexibility, BOXER can be easily configured to suit most every user's
taste. New users consistently praise BOXER in the strongest terms.

A complete feature list would be huge, so here are some of BOXER's most
important capabilities: multi-level Undo and Redo, Color Syntax
Highlighting, multiple files and windows, full mouse support, keyboard
reconfiguration, support for extended screen sizes, column marking,
macros, color, pull-down menus, word processing, and context sensitive
online help. Also: search with wildcards, compile within the editor,
small footprint shell, graphic drawing mode, auto indent, find mating
parenthetical characters, block commands: cut, copy, append, paste,
delete, write, print, fill, sort, total, average, case convert, invert,
entab, detab, more! Software from David Hamel $49-89.

** BOXER 7.5 adds many new features and options! **

Windows Clipboard Support: BOXER/DOS and TKO now communicate directly
with the clipboard in Windows 3.1 and Windows 95. Paste text directly
into Boxer from the Windows clipboard; paste text from Boxer into other
desktop programs!

Long Filename Support: BOXER/DOS and TKO provide full support for
creating and editing long filenames in Windows 95. Filenames can be up
to 255 characters long, contain embedded spaces, and use upper and lower
case!

Date Sorting: Boxer has a comprehensive date sort capability which
supports both domestic and international numeric date formats. Sort
lines by mdy, dmy or ymd, with two- or four-digit years, with or without
date separators!

Syntax Highlighting: a third set of up to 1,024 reserved words can be
defined and distinctly colored. Use wildcards (? and *) to quickly
define entire classes of reserved words. Also: enhanced comment
handling; new syntax info for Java, 4DOS, HTML and Perl.

Extra Clipboards, Index: ten additional clipboards areas have been
added in version 7.5. Use the new Index page within Boxer's Clipboard
Manager to view a summary of all 36 clipboards at a single glance.

Longer Lines: BOXER/OS2 and BOXER/TKO can now edit files with lines up
to 3000 characters in length.




--
My DOS programs: hhtp://www.lieber.com.ar

---------------------
Ing. Alejandro Lieber
Rosario Argentina
---------------------