Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How do I use the cut command to only print the directories? Post 302983164 by rbatte1 on Friday 7th of October 2016 06:48:59 AM
Old 10-07-2016
Yes, apologies, I never thought of varying column widths when the byte count grows or the file age exceeds 6 months.

I suppose I could argue that if people insist on putting spaces in file names then, ..........



Robin
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help with Cut command

Hi I am using 'find' on a particular directory which has some subdirectories too,so when I search for .txt files from the parent directory, it gives all files that matches the pattern in the parent aswellas in the sub directories . eg: Iam at /a/b/c where c has many other directories in it ... (7 Replies)
Discussion started by: jagadish_gaddam
7 Replies

2. UNIX for Dummies Questions & Answers

cut and print part of a string

I have a file that contains: yahoo.com.23456 web.log.common.us.gov.8675 192.168.1.55.34443 john-doe.about.com.22233 64.222.3.4.120 sunny.ca.4442 how can i remove the strings after the last dot (.) and reprint the file? Thanks. (3 Replies)
Discussion started by: apalex
3 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Using grep command to find the pattern of text in all directories and sub-directories.

Hi all, Using grep command, i want to find the pattern of text in all directories and sub-directories. e.g: if i want to search for a pattern named "parmeter", i used the command grep -i "param" ../* is this correct? (1 Reply)
Discussion started by: vinothrajan55
1 Replies

5. Shell Programming and Scripting

Print the whole line which contains the result of the command cut

Hey everyone I have a file 'agenda' which contains: Object Day Month Year Birthday 09 02 2012 i want to extract from a script the line which contains the day the user typed. for example if he type 09 the line is showed using... (4 Replies)
Discussion started by: Goldstein
4 Replies

6. Shell Programming and Scripting

Print path files in different directories

Hi guys :) First of all Happy New Year :) so i dont know if my doubt its already here posted by other person ... i need to print to one file the path of few files that are in different directories, like this: directory muscle ATP6.aa.muscle.fasta COX1.aa.muscle.fasta . . . ... (2 Replies)
Discussion started by: andreia
2 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Print/cut/grep/sed/ date yyyymmdd on the filename only.

I have this filename "RBD_EXTRACT_a3468_d20131118.tar.gz" and I would like print out the "yyyymmdd" only. I use this command below, but if different command like cut or print....etc. Thanks ls RBD_EXTRACT* | sed 's/.*\(........\).tar.gz$/\1/' > test.txt (9 Replies)
Discussion started by: dotran
9 Replies

9. 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
eucset(1)						      General Commands Manual							 eucset(1)

NAME
eucset - Sets and gets EUC code widths for the terminal SYNOPSIS
eucset [cswidth] eucset -p OPTIONS
Displays the current settings of the EUC character widths for the terminal DESCRIPTION
The eucset command sets or gets the encoding and display widths of the Extended UNIX Code (EUC) characters processed by the current input terminal. EUC is an encoding method for code sets composed of single or multiple bytes. It permits applications and the terminal hardware to use the 7-bit US ASCII code and up to three single- or multibyte code sets simultaneously. If you use the eucset command to set EUC character widths, but do not specify the cswidth argument, 7-bit U.S. ASCII is applied as a default code set. You must use the command to specify any other EUC code sets, whether they are single-byte or multibyte. EUC Code Set Classes EUC divides code sets into four classes. Each code set class has two characteristics: the number of bytes for encoding the characters in the class, and the number of display columns to display the characters in the class. All characters within a class possess the same char- acteristics. Class 0 consists of all 7-bit, single-byte ASCII characters. The most-significant bit of each of these characters is 0 (zero). Characters in class 0 require one byte for encoding, and occupy one display column. These values are fixed for class 0 (zero). The 7-bit US ASCII code is the primary EUC code set, which is available to users without direct specification. A class 1 code set is a supplementary EUC code set. Class 1 characters have an initial byte whose most-significant bit is 1. If character classes 2 or 3 are to be used, this initial byte must not be the SS2 or SS3 character, as these designate character classes 2 and 3. Char- acters in class 1 may require more than 1 byte for encoding, and may require more than 1 display column. The eucset command must be used to set the characteristics for code set class 1. Class 2 and 3 code sets are supplementary EUC code sets. Characters in these classes have an initial byte of SS2 or SS3, respectively. They require more than 1 byte for encoding, and may require more than 1 display column. The eucset command must be used to set the charac- teristics for code set classes 2 and 3. The cswidth argument in the eucset command line is a character string that describes the character widths for code set classes 1 through 3. The string is of the following format: X1[:Y1], X2[:Y2], X3[:Y3] The value X1 is the number of bytes required to encode a character in code set class 1. Y1 is the number of display columns needed to dis- play characters in this class. X2 is the number of bytes required to encode a character in code set class 2, not counting the SS2 byte, and Y2 is the number of display columns for code set class 2 characters. X3 is the number of bytes needed to encode characters in code set class 3, not counting the SS3 byte, and Y3 is the number of display columns required for these characters. The values for the column widths can be omitted if they are equal to the number of encoding bytes. If the encoding value of any of the EUC code sets is set to 0 (zero), this indicates that the code set does not exist. If no cswidth argument is supplied, the eucset command uses the value of the CSWIDTH environment variable. If this variable is not present, the default string 1:1,0:0,0:0 is substituted. This default string designates that the environment uses a single-byte EUC code set that has characters in the EUC code set class 1 format. If the environment uses a multibyte EUC code set in the code set class 1 format, single- or multibyte EUC code sets in the code set class 2 or 3 format, or both, the default setting cannot be used. DIAGNOSTICS
Your standard input is not an interactive terminal. The maximum character width of 8 was exceeded. EXAMPLES
To display the encoding and display widths for the EUC code set classes 1-3 in your environment, enter: eucset -p To change the current settings of the encoding and display widths for the EUC characters in code set classes 1 and 2 to 2 bytes each, enter: eucset 2:2,2:2,0:0 or eucset 2,2,0 SEE ALSO
Interfaces: eucioctl(7) eucset(1)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy