We have a lot of scripts using cut as : cut -c 0-8 --works for cut (GNU coreutils) 5.97, but does not work for cut (GNU coreutils) 8.4.
Gives error -
The position needs to start with 1 for later version of cut and this is causing an issue.
Is there a way where I can have multiple cut versions installed and use the older version of cut for the user which runs the script?
or any other work around without having to change the scripts?
Thanks.
Last edited by RudiC; 06-30-2016 at 05:53 AM..
Reason: Added code tags.
We are running on a Sun cluster using ksh.
We have a script that has been running for about six months with no issues. The script has not been modified and our results are now coming out diffrent.
<BEGIN>
cat $exfile | while read line
do
... (1 Reply)
Hi,
I am facing a weird problem with the 'Date'. If I check date multiple times in a short interval I see a different time altogether. Here is an example
$ date
Tue Jul 15 02:07:22 PDT 2008
$ date
Tue Jul 15 02:07:23 PDT 2008
$ date
Tue Jul 15 03:20:42 PDT 2008
$ date
Tue Jul 15... (5 Replies)
Hi,
I would like to ask for your help with my problem,
im writing a unix script to remove characters before the symbol "/", but the one being removed are characters after the symbol. Ive searched over the internet and found no answer.. hope you can help me with this.
sample:
text... (2 Replies)
Evening,
I'm posting for help here, because I'll be honest I've reached the end of my tether, hopefully someone can give me some assistance and help me maintain a level of sanity...
I maintain a number of webservers on RHEL 5 64Bit (Red Hat Enterprise Linux Server release 5.3 (Tikanga)), the... (2 Replies)
Hi,
I heard a command that can collect all RHEL 5 log in a single compress file before I forget.
Does any body know...What the command is ?
Thanks. (4 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
After using the egrep command to pull certain lines from the asg5f1 (creating the asg5f1c file), I am required... (1 Reply)
Hello,
I'm attempting to setup a test network with a client-server based architecture using a proprietary application. The client works by communicating with the server on separate links (typically cellular connections) and then initiates a tunnel over each active link. However, in place of the... (0 Replies)
Hi,
I am migrating few of the shell scripts from existing SUN Solaries to AIX.
My script contains some command like 'dos2unix' and 'unix2dos' which are not compatible in AIX flavour. Please let me know if there is any such commands in AIX which can replace these commands.
Thanks. (1 Reply)
Hi all, I'm new here.
I am currently using RHEL 6.10 and transitioning to RHEL 7 soon. Some of my GUI developments are developed using Glade v2.6.8. My question is: Is Glade v2.6.8 compatible with RHEL 7? Do I need to install additional libraries or dependencies? I looked up the list of... (1 Reply)
Discussion started by: chaosvn
1 Replies
LEARN ABOUT V7
cut
CUT(1) User Commands CUT(1)NAME
cut - remove sections from each line of files
SYNOPSIS
cut OPTION... [FILE]...
DESCRIPTION
Print selected parts of lines from each FILE to standard output.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-b, --bytes=LIST
select only these bytes
-c, --characters=LIST
select only these characters
-d, --delimiter=DELIM
use DELIM instead of TAB for field delimiter
-f, --fields=LIST
select only these fields; also print any line that contains no delimiter character, unless the -s option is specified
-n (ignored)
--complement
complement the set of selected bytes, characters or fields
-s, --only-delimited
do not print lines not containing delimiters
--output-delimiter=STRING
use STRING as the output delimiter the default is to use the input delimiter
-z, --zero-terminated
line delimiter is NUL, not newline
--help display this help and exit
--version
output version information and exit
Use one, and only one of -b, -c or -f. Each LIST is made up of one range, or many ranges separated by commas. Selected input is written
in the same order that it is read, and is written exactly once. Each range is one of:
N N'th byte, character or field, counted from 1
N- from N'th byte, character or field, to end of line
N-M from N'th to M'th (included) byte, character or field
-M from first to M'th (included) byte, character or field
AUTHOR
Written by David M. Ihnat, David MacKenzie, and Jim Meyering.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report cut translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
Full documentation at: <http://www.gnu.org/software/coreutils/cut>
or available locally via: info '(coreutils) cut invocation'
GNU coreutils 8.28 January 2018 CUT(1)