07-19-2012
With a long series of pipes it can be hard to trap and respond correctly to an error.
More pipes makes that harder to. Learn about the PIPESTATUS array if you want to write solid bash and use lots of pipes.
Some operations require pipes to become more efficient, e.g., pipes "cost" less disk space. And leave behind no intermediate files.
The book 'Code Complete' recommends that a line of code be split with continuation "\" when it gets beyond the max line length on your screen: ~80 character positions, including leading tabs and spaces. You can also split on a pipe symbol. This is to provide readability for the next guy.
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
I'm a frequent visitor to these forums. I generally enjoy topics that are posted as well as the responses. I really pickup a lot of new things to learn.
However, there is one thing that does bother me here. (I dont mean to start a flame war, or any problems at all, just expressing some... (8 Replies)
Discussion started by: tarballed
8 Replies
2. IP Networking
I have a series of new machines that are internet facing (have IP's that are accessible via the 'net) and it has internal facing interfaces. I need to be able to communicate back to the internal network to a specific server which processes monitoring and e-mail traffic. I've been told that I should... (3 Replies)
Discussion started by: BOFH
3 Replies
3. UNIX for Dummies Questions & Answers
My goal was to find any directories inside of any directory called "09_Client Original" not modified in the last 30 days.
$ find /Volumes/Jobs_Volume/ -type d -name "09_Client Original" -exec find {} -mtime +30 -type d -maxdepth 1 \;
The results of this find are passed along in a perl script... (1 Reply)
Discussion started by: guriboy
1 Replies
4. Shell Programming and Scripting
foll. is my code snippet.
#!/bin/ksh
retVal=`sqlplus -s user/passwd@oracle_sid <<EOF
SET SERVEROUTPUT ON SIZE 100000
DECLARE
STATUS_VALUE CHAR;
BEGIN
SELECT temp1 INTO STATUS_VALUE FROM sai;
DBMS_OUTPUT.PUT_LINE(STATUS_VALUE);
END;
/
SET... (1 Reply)
Discussion started by: sainathdeg
1 Replies
5. Shell Programming and Scripting
Hi,
Below is my script which creates a file:
#!/bin/sh
if
then
echo "Enter bill period "
echo "Syntax: sh cpd.sh G08"
exit
fi
sqlplus uname/pwd@dbname <<EOF
set WRAP off
set FEEDBACK off
set PAGESIZE 0
set VERIFY off (14 Replies)
Discussion started by: ss_ss
14 Replies
6. BSD
I'm learning UNIX on my mac (BSD), using a manual. I'm trying to figure out the grep command, and am getting something wrong. I've opened one of my files in NeoOffice and am looking for a string, the phrase 'I am writing.' I've been to some sites to get the proper syntax, and from what I can see... (5 Replies)
Discussion started by: Straitsfan
5 Replies
7. Shell Programming and Scripting
I have written a Bash Script that captures video via the Linux application DVgrab. When run my script prompts the terminal user to enter all the necessary information for the capture, save location, file name, file type capture duration etc...
These are all in the form of
#!/bin/bash
echo... (5 Replies)
Discussion started by: Starcast
5 Replies
8. UNIX for Dummies Questions & Answers
Hello,
On a linux server (centos 5.4), users upload file that should be flv. How can I check that the file is a real and proper flv file? Checking the extension is not enough!
Thanks (1 Reply)
Discussion started by: JCR
1 Replies
9. What is on Your Mind?
Recently i started to work in new company. I will replace old admin who is going into retirement and he has been showing me his procedures for server, database and network administration.
From first point of view: there is absolutely no configuration management involved how they deploy software... (0 Replies)
Discussion started by: solaris_user
0 Replies
10. Cybersecurity
Hey guys, not sure should I post it here or in 'What is on Your Mind?'
I'm discussing usage of DSL (domain specific language) in security tools with my colleagues. We haven't been able to reach an agreement over naming conventions.
There are many tools using DSL: splunk, sumologic,... (2 Replies)
Discussion started by: Tobby P
2 Replies
LEARN ABOUT DEBIAN
pct-scanner-script
PCT-SCANNER-SCRIPT(1) General Commands Manual PCT-SCANNER-SCRIPT(1)
NAME
pct-scanner-script - easy scan and create merged DjVu and PDF documents for archiving
SYNOPSIS
pct-scanner-script [--help]
DESCRIPTION
pct-scanner-script is a bash script and configuration system to easily scan documents and create a digital archiving. It can create DjVu
PDF and JPEG outputs, in merged and individual files. It also has a configuration system where different configurations can be defined,
making it easy to switch between configurations.
Please use pct-scanner-script --help to find all program options, the complete help, and all examples.
Features:
- auto archiving in merged and individual DjVu, PDF, and JPEG files
- auto and manual resume when scanning somehow fails
- cascading configuration system, for easy customizing
- easy command-line-style bash program, with useful options
- archiving made possible with both adf and flatbed scanners
- built for productivity and daily use
- uses bash, scanadf and other mainstream processing tools
- multilanguage commandline output
OPTIONS
-h, --help, -?
Show summary of options, help, and examples.
DEBUGGING
This program is a helper script to easy scan and automated digital document archiving for normal and adf scanners. You can debug this
script by running it as bash -x pct-scanner-script [options]. The script is just a nice wrapper for the scanadf, DjVu and PDF tools.
SEE ALSO
scanadf(1),
AUTHOR
pct-scanner-script and this manual page are written by:
Jelle de Jong <jelledejong@powercraft.nl>.
March 31, 2009 PCT-SCANNER-SCRIPT(1)