root@corum.UUCP (System Administration) (01/22/88)
sigh... what is the equivalent function for "cut" on xenix? i have a bunch of shell scripts that i ported over from a vax that has oodles of "cut"s in them. thanks in advance, -- Derek Terveer root@corum.UUCP ..!clyde!lily!corum!root
root@cca.ucsf.edu (Computer Center) (01/28/88)
In article <116@corum.UUCP>, root@corum.UUCP (System Administration) writes: > sigh... what is the equivalent function for "cut" on xenix? i have a bunch of > shell scripts that i ported over from a vax that has oodles of "cut"s in them. > The equivalent of System V "cut" on Xenix is "cut". It is part of the text processing utilities package. Thos Sumner (thos@cca.ucsf.edu) BITNET: thos@ucsfcca (The I.G.) (...ucbvax!ucsfcgl!cca.ucsf!thos) OS 2 -- the Operating System for puppets. #include <disclaimer.std>
jack@turnkey.TCC.COM (TCC Software Developer) (01/28/88)
In article <116@corum.UUCP> root@corum.UUCP (System Administration) writes: >sigh... what is the equivalent function for "cut" on xenix? i have a bunch of >shell scripts that i ported over from a vax that has oodles of "cut"s in them. You apparantly do not have the complete Xenix package (from some of your other postings I wonder if you have the manuals either :-}), because there is no "equivalent" function to cut, cut is included in the Xenix text processing package, just as it would be in any unix system. -- Jack F. Vogel Turnkey Computer Consultants, Costa Mesa, CA UUCP: ...!uunet!turnkey!jack Internet: jack@turnkey.TCC.COM
domo@riddle.UUCP (Dominic Dunlop) (01/29/88)
In article <116@corum.UUCP> root@corum.UUCP (System Administration) writes: >sigh... what is the equivalent function for "cut" on xenix? i have a bunch of >shell scripts that i ported over from a vax that has oodles of "cut"s in them. Strange. Cut's there on my XENIX (SCO 2.2.1 for the 80386), and I can't recall it having been missing in recent older versions. But anyway, if you've got awk, you can use that instead of cut: cut -f2-7 is the same as awk '{FS=OFS='\t'; print $1, $2, $4, $5, $6, $7}' cut -c2-7 is the same as awk '{print substr($0, 2, 7-2+1)}' Life gets slightly more interesting in the general case (-d: -f1-9,11,13-). If you wanted to get flashy, writing a shell script -- or awk program -- to convert uses of cut to uses of awk wouldn't be too difficult. But I'm not volunteering... If you're really desperate, you can use sed to isolate parts of lines. For example cut -c2-7 is the same as sed 's/^.\(......\).*$/\1/' cut -f2-7 is the same as something possible, but very longwinded -- Dominic Dunlop domo@sphinx.co.uk domo@riddle.uucp
daveb@laidbak.UUCP (Dave Burton) (01/30/88)
In article <9343@steinmetz.steinmetz.UUCP> davidsen@zephyrus.UUCP (william E Davidsen) writes: >In article <116@corum.UUCP> root@corum.UUCP (System Administration) writes: >>sigh... what is the equivalent function for "cut" on xenix? >/usr/bin/cut works on Xenix/286 and Xenix/386. Don't have access to >any of the 68k versions. ... as well as on Xenix/68k System III. all i really wanted to do was add one line, but NOOOO, i gotta beat the 50% rule :-) -- --------------------"Well, it looked good when I wrote it"--------------------- Verbal: Dave Burton Net: ...!ihnp4!laidbak!daveb V-MAIL: (312) 505-9100 x325 USSnail: 1901 N. Naper Blvd. #include <disclaimer.h> Naperville, IL 60540
wnp@killer.UUCP (Wolf Paul) (02/02/88)
In article <1327@laidbak.UUCP> daveb@laidbak.UUCP (Dave Burton) writes: > >all i really wanted >to do was add one >line, but NOOOO, i >gotta beat the 50% rule :-) According to the documents in news.newuser, you are supposed to beat the 50% rule NOT by adding garbage lines, but by changing the quote character from '>' to some other character. Wolf Paul ihnp4!killer!wnp
jfh@killer.UUCP (The Beach Bum) (02/05/88)
There is a public domain version in your local source archive. If you don't have a local source archive, send mail. If you are a local call from Dallas, send an L.sys line. - John. -- John F. Haugh II SNAIL: HECI Exploration Co. Inc. UUCP: ...!ihnp4!killer!jfh 11910 Greenville Ave, Suite 600 "Don't Have an Oil Well? ... Dallas, TX. 75243 ... Then Buy One!" (214) 231-0993 Ext 260
jkimble@crash.cts.com (Jim Kimble) (02/07/88)
In article <1144@ucsfcca.ucsf.edu> root@cca.ucsf.edu (Computer Center) writes: >In article <116@corum.UUCP>, root@corum.UUCP (System Administration) writes: >> sigh... what is the equivalent function for "cut" on xenix? i have a bunch of >> shell scripts that i ported over from a vax that has oodles of "cut"s in them. >> >The equivalent of System V "cut" on Xenix is "cut". It is part of the >text processing utilities package. > Mr. Computer Center may have a copy of TI's "enhanced" version of SCO Xenix. We use it at the office and both cut and paste are not included with the OS; you have the buy the "Text Processing Package." When I ported over a SysV application that was using cut every couple lines, I just substituted the lines with a "sed" script. Something to the effect of: set cow = `tty | cut -c6-` to set cow = `tty | sed 's/.dev.//g'` Although it's a really dirty work-around, it works. --Jim Kimble "I used to be into necrophillia, flagellation, and beastiality -- but my friends said I was just beating a dead horse." UUCP: {hplabs!hp-sdd, sdcsvax, nosc}!crash!jkimble ARPA: crash!jkimble@nosc INET: jkimble@crash.CTS.COM