/usr/bin/shift_lines is in xviewg 3.2p1.4-28.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/perl --
# Free replacement for Sun's shift_lines as required by Openwin's
# text_extras_menu.
#
# Copyright (C) 1998 by Martin Buck <mbuck@debian.org>
# Licensed under the GNU General Public License
$shift = 1;
if ($#ARGV >= 0) {
if ($#ARGV != 1 || $ARGV[0] ne "-t") {
die "Usage: $0 [-t <num>]\n";
}
$shift = $ARGV[1];
}
$spaces = "";
if ($shift >= 0) {
for ($s = 1; $s <= $shift; $s++) {
$spaces = $spaces . " ";
}
}
while (<STDIN>) {
if ($shift < 0) {
print substr($_, -$shift);
} else {
print $spaces . $_;
}
}
|