Solved

Running sh script without outputting results

Posted on 2004-08-23
2
264 Views
Last Modified: 2010-04-20
Hello.

The following outputs text stating the results.

How can I make it do it in the background, without outputting any results?


Could I use "@" somewhere to do this?  Thanks!


#!/bin/sh
do jpegtopnm -quiet large.jpg | pnmscale -xysize 200 150 | ppmtojpeg > smaln.jpg
0
Comment
Question by:hankknight
2 Comments
 
LVL 6

Assisted Solution

by:tanelorn
tanelorn earned 250 total points
ID: 11875269
HI,

try this

do jpegtopnm -quiet large.jpg | pnmscale -xysize 200 150 | ppmtojpeg > smaln.jpg >/dev/null 2>&1

Tanelorn
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 250 total points
ID: 11875473
http://www.linux.com/guides/Intro-Linux/sect_05_01.shtml

is an excellent intro to this, and will help you to understand the bit at the end of the line

The above looks good, and I can only alter it slightly:

do jpegtopnm -quiet large.jpg | pnmscale -xysize 200 150 | ppmtojpeg > smaln.jpg >/dev/null 2>&1 &

The additional & makes the process occur in the background instead of occupying the command prompt until the process finishes.

HTH:)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now