Linux equivalent package for "newform"


 
Thread Tools Search this Thread
Operating Systems Linux Linux equivalent package for "newform"
# 1  
Old 04-02-2013
Linux equivalent package for "newform"

What is the rpm package details for the "newform" in solaris. ?

Solaris package description
"newform newform (1) - change the format of a text file"
/usr/bin/newform

If "newform" is not available as such, which of the rpm package that could be installed as a substitute. ?
# 2  
Old 04-02-2013
Don't know of any direct substitute. Most any language can do the same thing, but it won't have the same options or syntax. Do you need the entire thing, or is there some specific task you need?
# 3  
Old 04-02-2013
Nothing really to contribute just thought I'd drop a full reference in here for someone who has some ideas. Command description from one of my online books.
# 4  
Old 04-02-2013
Hi.

Does Open{ Solariis, Indiana} provide source? If so, it might be compilable on Linux.

Best wishes ... cheers, drl
# 5  
Old 04-13-2013
Hi.

A Google search for openindiana source "newform" produced about 60K hits. From one of those I found the source for the code and man page. It compiled first time with gcc. Here's a sample run:
Code:
#!/usr/bin/env bash

# @(#) s1	Demonstrate basic reformatting of text file: newform.

# See: Google search for [openindiana source "newform"]

# Utility functions: print-as-echo, print-line-with-visual-space, debug.
# export PATH="/usr/local/bin:/usr/bin:/bin"
pe() { for _i;do printf "%s" "$_i";done; printf "\n"; }
pl() { pe;pe "-----" ;pe "$*"; }
db() { ( printf " db, ";for _i;do printf "%s" "$_i";done;printf "\n" ) >&2 ; }
db() { : ; }
C=$HOME/bin/context && [ -f $C ] && $C newform ruler

FILE=${1-data1}

pl " Display usage:"
newform -Q

pl " Input data file $FILE, raw:"
cat $FILE

pl " Input data file $FILE, display invisibles:"
cat -A $FILE

pl " Results, raw (with column markers):"
ruler 78
newform -s -i -l -a -e $FILE

pl " Results, display invisibles:"
ruler 78
newform -s -i -l -a -e $FILE |
cat -A

exit 0

producing:
Code:
% ./s1

Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution        : Debian GNU/Linux 5.0.8 (lenny) 
bash GNU bash 3.2.39
newform (local) $Revision: 1.3$, (OpenSolaris 5.10, 1997)
ruler - ( local: RepRev 1.8, ~/bin/ruler, 2013-04-11 )

-----
 Display usage:
usage: newform  [-s] [-itabspec] [-otabspec] [-pn] [-en] [-an] [-f] [-cchar]
		[-ln] [-bn] [file ...]

-----
 Input data file data1, raw:
1	Hello, world.
2		Good	bye,	world.

-----
 Input data file data1, display invisibles:
1^IHello, world.$
2^I^IGood^Ibye,^Iworld.$

-----
 Results, raw (with column markers):
         1         2         3         4         5         6         7
123456789012345678901234567890123456789012345678901234567890123456789012345678
Hello, world.                                                           1
        Good    bye,    world.                                          2

-----
 Results, display invisibles:
         1         2         3         4         5         6         7
123456789012345678901234567890123456789012345678901234567890123456789012345678
Hello, world.                                                           1$
        Good    bye,    world.                                          2$

Best wishes ... cheers, drl
This User Gave Thanks to drl For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. AIX

mkinstallp package creation failing "no such file: ./usr/lpp/<package name>/inst_root"

Hello, I'm trying to build a (bff) package from an already installed program (clam antivirus) using mkinstallp. However, mkinstallp fails with "no such file: ./usr/lpp/<package name>/inst_root" I'm not sure why all files get created ok except for these particular ones. Any help would be... (2 Replies)
Discussion started by: omonte
2 Replies

2. UNIX for Advanced & Expert Users

Commands on Digital Unix equivalent to for "top" and "sar" on other Unix flavour

Hi, We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0. Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ? I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc. ... (1 Reply)
Discussion started by: sameerdes
1 Replies
Login or Register to Ask a Question