Sponsored Content
Full Discussion: Question on the cut command
Top Forums UNIX for Dummies Questions & Answers Question on the cut command Post 302346489 by figaro on Saturday 22nd of August 2009 10:46:28 AM
Old 08-22-2009
Thank you for your response. So it seems it was a design decision in one version of UNIX, but not copied over to its siblings.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cut question

#!/bin/bash echo "UserName PID Command" ps -ef > ps.temp grep '^\{2,3\}\{4\}' ps.temp > ps.temp2 cut -f1,2,8 ps.temp2 rm ps.temp* I am having some problems with the cut command. I only want to display the UID (field 1), PID(field 2), and Command(field 8). Right now the whole ps -ef... (5 Replies)
Discussion started by: knc9233
5 Replies

2. Shell Programming and Scripting

Cut -d Question

I went through quite a few threads and didn't find anything on this. I also looked on other sites and couldn't turn up an answer. For completeness sake, I'm working off of solaris 10 in the korn shell environment. I wrote a script for a buddy to help him out with the following issue. He... (12 Replies)
Discussion started by: Janus
12 Replies

3. Shell Programming and Scripting

sort / cut question

Hi All, I have a small problem, hope you can help me out here. I have a file that contains the same format of lines in 99% of the cases. 906516 XYZ.NNN V 0000 20070711164648 userID1 userID2 hostname 20070711164641 There are unfortunately several lines with these... (5 Replies)
Discussion started by: BearCheese
5 Replies

4. Shell Programming and Scripting

The cut command. Really simple question!

hi, sorry for asking what I am sure is a really easy question, I am wanting to cut the users real name from the output of 'finger'. $ cut -f2-3 filename is in my script but it only seems to cut the first line. I need to cut the 2nd and 3rd word from each line and store them in variables... (1 Reply)
Discussion started by: rorey_breaker
1 Replies

5. UNIX for Dummies Questions & Answers

Cut Question

Hi, I have created a variable abc within my script which can have values as follows abc = Ram,Iam or it can be abc = Uam or it can be abc = Sam,Tam,Pam Basically it can have a max of 3 values , seperated by comma. I want to assign these 3 values to 3 different variables In case of... (2 Replies)
Discussion started by: samit_9999
2 Replies

6. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

7. Shell Programming and Scripting

A question on cut

hi, I used cut to get the I have a file f1 with content: 101.2 ms RTT from 3WHS 95.2 ms RTT from 3WHS 97.3 ms RTT from 3WHS 97.4 ms RTT from 3WHS 122.2 ms RTT from 3WHS 103.5 ms RTT from... (2 Replies)
Discussion started by: esolve
2 Replies

8. UNIX for Dummies Questions & Answers

Question on cut

Korn Shell I have a file whose values are delimited using colon ( : ) $ cat test.txt hello:myde:temp:stiker $ cut -d: -f2,4 test.txt myde:stikerI want field 2 and field 4 to be returned but separated by a hyphen. The output should look like myde-stiker How can do this ? (without awk... (11 Replies)
Discussion started by: kraljic
11 Replies

9. UNIX for Dummies Questions & Answers

Cut pid from ps using cut command

hay i am trying to get JUST the PID from the ps command. my command line is: ps -ef | grep "mintty" | cut -d' ' -f2 but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that. i know i can use awk or cut... (8 Replies)
Discussion started by: ran ber
8 Replies

10. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
COLUMN(1)						    BSD General Commands Manual 						 COLUMN(1)

NAME
column -- columnate lists SYNOPSIS
column [-tx] [-c columns] [-s sep] [file ...] DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored. The options are as follows: -c Output is formatted for a display columns wide. -s Specify a set of characters to be used to delimit columns for the -t option. -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. -x Fill columns before filling rows. ENVIRONMENT
The COLUMNS, LANG, LC_ALL and LC_CTYPE environment variables affect the execution of column as described in environ(7). EXIT STATUS
The column utility exits 0 on success, and >0 if an error occurs. EXAMPLES
(printf "PERM LINKS OWNER GROUP SIZE MONTH DAY " ; printf "HH:MM/YEAR NAME " ; ls -l | sed 1d) | column -t SEE ALSO
colrm(1), ls(1), paste(1), sort(1) HISTORY
The column command appeared in 4.3BSD-Reno. BUGS
Input lines are limited to LINE_MAX (2048) bytes in length. BSD
July 29, 2004 BSD
All times are GMT -4. The time now is 09:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy