07-10-2008
Quote:
Originally Posted by
prvnrk
Thanks for your replies.
Vgersh - Your solution worked (as space is the delimiter). I'm sorry that i did not use "comma" in the example. Actually the delimiter is "comma" as mentioned in the post.
Please advise.
Prvn
use radoulov's code
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have windows Xp installed, and decided to install Solaris Sun Unix 10. The hard disk was previousely partitioned into 5 partition. C: = Win98 D = WinXP and e,f,g,h are applications and so on. When istalling Sun Unix, will all the drives be removed, or I will specify where to install it. Thanks... (5 Replies)
Discussion started by: sunsation
5 Replies
2. Shell Programming and Scripting
hello Everyone.
I'm having the following problem:
I have number of installation in the directory. each installation consists of executable file and directory. when I do the new installation I move old one to File_name-Time_stamp. this is done for executable and for directory. Everything is done... (6 Replies)
Discussion started by: slavam
6 Replies
3. UNIX for Dummies Questions & Answers
Hello all!
I ran rm -rf on a wrong directory, noticed it and hit ctrl-c.
Is there any way on a debian machine to tell what actually got deleted?
As there were many dirs and files in this directory that I don't care for, I'd like to see if anything important was removed.
Or do you know in... (4 Replies)
Discussion started by: thosch
4 Replies
4. UNIX for Advanced & Expert Users
I used the following to remove ^M in all files - I guess i did it in haste :mad:
find / -name "*" | xargs perl -p -i -e 's/^M//g' *
It changed all my LIBRABRIES since i used -- perl -p -i -e 's/^M//g' *
Is there some way to revert this from my libraries . Does any revert command... (10 Replies)
Discussion started by: telecomics
10 Replies
5. AIX
Hi,
After accidental default route removal serial connection doesn't work.
What should I do to connect to my machine ?
thanks
Vilius (7 Replies)
Discussion started by: vilius
7 Replies
6. Shell Programming and Scripting
Hi Guys,
I am using SunOS 5.9 running Oracle Databases on it...
I have log files that I suspect that some lines within the logs where removed.
How do I tell if indeed some lines within a particular file where removed and by whom?
Thanks in advance (2 Replies)
Discussion started by: Phuti
2 Replies
7. Linux
Hi Team,
I have deleted a file accidentally by using rm command. I am not the root(admin) user. Can you please let me know how to get that .tex file? (2 Replies)
Discussion started by: darling
2 Replies
8. Shell Programming and Scripting
Hello,
I have few file such as below:
abc.txt
def.txt
ghi.txt
jkl.txt
n.txt
I would like to merge all these files together into one file. At the same time, any duplicates will be removed. (5 Replies)
Discussion started by: alegnagrp
5 Replies
CUT(1) BSD General Commands Manual CUT(1)
NAME
cut -- select portions of each line of a file
SYNOPSIS
cut -b list [-n] [file ...]
cut -c list [file ...]
cut -f list [-d delim] [-s] [file ...]
DESCRIPTION
The cut utility selects portions of each line (as specified by list) from each file and writes them to the standard output. If the file
argument is a single dash ('-') or no file arguments were specified, lines are read from the standard input. The items specified by list can
be in terms of column position or in terms of fields delimited by a special character. Column numbering starts from 1.
list is a comma or whitespace separated set of increasing numbers and/or number ranges. Number ranges consist of a number, a dash (-), and a
second number and select the fields or columns from the first number to the second, inclusive. Numbers or number ranges may be preceded by a
dash, which selects all fields or columns from 1 to the first number. Numbers or number ranges may be followed by a dash, which selects all
fields or columns from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. It
is not an error to select fields or columns not present in the input line.
The options are as follows:
-b list The list specifies byte positions.
-c list The list specifies character positions.
-d string Use the first character of string as the field delimiter character. The default is the <TAB> character.
-f list The list specifies fields, separated by the field delimiter character. The selected fields are output, separated by the field
delimiter character.
-n Do not split multi-byte characters.
-s Suppresses lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified.
EXIT STATUS
cut exits 0 on success, 1 if an error occurred.
SEE ALSO
paste(1)
STANDARDS
The cut utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'').
BSD
December 21, 2008 BSD