what is the DOS equivalent of the "cut" command?

A

Ameya

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
 
B

Bill Sharpe

Ameya said:
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
Repeat after me:
There is no DOS in XP.

However, many years ago I used a text editor in DOS that could easily
delete columns. I can't recall the name. One cumbersome workaround would
be to import the resulting text file into Excel properly delimited so
that you could delete the desired column.

Bill
 
T

Tyler

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

How about Unix Tools http://unxutils.sourceforge.net/ or even Cygwin
http://www.cygwin.com/ ? They both have cut.exe that does the job
HTH
 
R

Ron Hardin

Tyler said:
How about Unix Tools http://unxutils.sourceforge.net/ or even Cygwin
http://www.cygwin.com/ ? They both have cut.exe that does the job
HTH

I second getting Cygwin. It's in fact superior to Linux itself, in that
all the XP drivers actually work with the hardware already, and there's
very little that doesn't work on the Linux emulation side. It's pretty
amazing.

The notable exception being that upper case and lower case refer to the
same file, in case you have both files at the same time ; and a.out
becomes a.exe which may break some of your old scripts, if you're
importing them.

All in all, it makes XP very liveable, almost more so than Linux itself.
 
V

Vanguard

Ameya said:
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)


Maybe the 'for' command (using the /f switch) does what you want.
 
A

Ameya

Repeat after me:
There is no DOS in XP.

However, many years ago I used a text editor in DOS that could easily
delete columns. I can't recall the name. One cumbersome workaround would
be to import the resulting text file into Excel properly delimited so
that you could delete the desired column.

Bill- Hide quoted text -

- Show quoted text -

Hello everyone,

Thank you for your replies. I have downloaded Cygwin and it works
great. Also, I repeat "There is no DOS in XP" :)
Thanks once again.

Regards,
Ameya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top