Sponsored Content
Full Discussion: Fighting useless use of cat
The Lounge What is on Your Mind? Fighting useless use of cat Post 302782163 by Corona688 on Monday 18th of March 2013 11:02:20 AM
Old 03-18-2013
Quote:
Originally Posted by MadeInGermany
Both should work!
while is not an external command, it's a shell builtin. The same rules don't always apply. That you can redirect into them at all is a huge blessing and feature rather unique to Bourne-based shells.
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

useless command

Hi, I came across with this line "set -x" in the beginning of a script, but i can't find one logic reason for this... should be something else after, i think.... anyone can help? tanx (2 Replies)
Discussion started by: cabresto
2 Replies

2. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

3. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

4. Shell Programming and Scripting

Useless Cat usage

cat ~/text.xt | while read line do echo ${line} | perl -pe 's/(\d+)/localtime($1)/e' done how can i efficiently re-code the above? also, no matter how i run this, i'm not getting the current/correct date. the contents of the "text.xt" looks like this: SERVICES... (2 Replies)
Discussion started by: SkySmart
2 Replies

5. What is on Your Mind?

Quest for the most useless command

I wrote by accident: cd . and even hit ENTER. Then I realized this is probably the most useless command that you can imagine. Yes, perhaps it could assert that there is still a working filesystem, but I am not sure about it. What do you think? Can you think of any more useless commands? :) (6 Replies)
Discussion started by: colemar
6 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy