I have a current code working(named subst1) having a user be able to type this line to substitute words using the sed command:
subst1 old-pattern new-pattern filename
Here is my shell script:
#!/bin/bash
# subst1
ARGS=3
E_BADARGS=65
if
then
echo "Usage: `basename $0`... (1 Reply)
Hey everybody
I need some help on how to order the data in file such as a file have first name last name and city and i would like to order them to in the same order by using sed
thanks alot for your time (6 Replies)
Hi i have a problem how to put som lines on top or in the bottom of the text with sed.
problem is that i am reading from stdin and when i have som lines starting with ++, i have to put some characters on the top of the lines starting with that ++
example of input
oooo
++abcd
++befg... (1 Reply)
Hi all,
I have files with the following names;
afgcxa.pem4jan.rain.nc
afgcxa.pem4feb.rain.nc
afgcxa.pem4mar.rain.nc
afgcxa.pem4apr.rain.nc
I want to rename them to
afgcxa.pem4-01.jan.rain.nc
afgcxa.pem4-02.feb.rain.nc
afgcxa.pem4-03.mar.rain.nc ... (5 Replies)
Hi All,
Below is the script which i have written in cygwin:
#!/usr/bin/sh
fname=$1
cat $fname | sed 's/ //g' > fname1
for i in `cat $fname1`
do
echo $i > file1
#param1 is script name
param1=`awk -F , '{print $1}' file1`
param1="$param1.sql"
#param2 is BL
param2=`awk -F , '{print... (5 Replies)
Hi,
i want to replace sub text which is in the middle of long text.
let me be more clear with an example.
Here is the actual text in the xml file
<module-option name="principalDNSuffix">,cn=Users,dc=X,dc=Y</module-option>
Now, in the above text, i want to replace all the content lying... (3 Replies)
Generate a ddl file, we have a flat file which contains many commands like REM, CREATE table, TRuncate etc
This script should copy only create table statements to the ddl file.
Create stmts can be in a single or multiple lines.
ex:- INPUT FILE
create table tbl1
(fld1,... (5 Replies)
Hi, I want to read a file from the command line and remove all the spaces, tabs in it, replacing it with comma(,), and write it to a new file. can you help me out with this scenario. (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Generalize your sub2 script, producing a new script sub3 that will apply a substitution to any number of files... (16 Replies)
Hi Guys,
I have a xml file as below where I need to find the particular XML tag(<dpath>) and delete the content of it.
<?xml version="1.0" encoding="UTF-8"?>
<title>XML</title><head>Ram</head><ControlCenter><doStatus>1</doStatus></ControlCenter><exitlabel>Gzip... (7 Replies)
Discussion started by: Vinoth Kumar G
7 Replies
LEARN ABOUT DEBIAN
aaphoto
AAPHOTO(1) aaphoto AAPHOTO(1)NAME
aaphoto - automatic color correction of photos
SYNOPSYS
aaphoto [option[s]] [source file[s]]
DESCRIPTION
Auto Adjust Photo is a tiny command-line image manipulation tool for automatic color correction of photos. It tries to make the picture
look better. The program does this by analyzing the input image and then sets the most optimal contrast, gamma, color balance and satura-
tion for it.
The following image types are supported (thanks to JasPer, JPEG and PNG):
mif, pnm / pgm / ppm, bmp, ras, jp2, jpc, jpg, png
Quality settings can be applied only to jp2, jpc, jpg formats
OPTIONS
The following options are supported:
-h--help
Print this help
-v--version
Print version information
-a--autoadjust
Auto adjust the colors of the image
-o--output
Set output directory
--overwrite
Overwrite mode, the original source file is replaced
--jpg
JPG image output
--jp2
JPEG 2000 image output
--png
PNG image output with alpha channel support
--bmp
BMP image output
-r--resize
Resize image taking the longer side in % or pixels
--rotate90
Rotate image with 90 degrees clockwise
--rotate180
Rotate image with 180 degrees
--rotate270
Rotate image with 90 degrees counter-clockwise
--flipx
Mirror image horizontally
--flipy
Mirror image vertically
--noexif
Save image without EXIF info
-q--quality
Set image quality from 1 to 100
-t--threads
Set number of working threads (default: autodetect)
-s--silent
Silent mode, no information printed during operation
--quiet
Same as -s, --silent
-V--verbose
Print verbose information about processing
--test
Print detailed test information into image
EXAMPLES
aaphoto folders
aaphoto image.jpg
aaphoto -a -r600 -q85 *.jpg
aaphoto mydir
aaphoto -V --resize70% image.png
aaphoto --quality60 image.jp2
aaphoto image.jp2
REMARKS
- auto adjust parameter is set by default without any other parameters
- a _new filename will be generated without --overwrite parameter
- every file is processed on directory input but not recursively
- order of parameters does not matter
- resize value can be set in percentage too
- resize parameter should be less or equal than original
- resize uses the best (and slowest) resampling method
- default jpeg compression quality is 95%
- EXIF information is restored in jpeg images by default
- number of threads is set to the number of online processors by default
AUTHORS
Auto Adjust Photo
Copyright (C) 2006-2011 Andras Horvath
E-mail: mail@log69.com - suggestions & feedbacks are welcome
URL: http://log69.com - the official site
Man page originally made by rezso (rezso@rezso.net)
The following libraries are used by this program:
libgomp - OpenMP for parallel programming, http://gcc.gnu.org/onlinedocs/libgomp/
libjasper - JasPer software, http://www.ece.uvic.ca/~mdadams/jasper/
libjpeg - IJG JPEG software, http://www.ijg.org/
libpng - PNG software, http://www.libpng.org/
libz - Compression library, http://www.zlib.net/
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
SEE ALSO
The full documentation for aaphoto is available on the website: http://log69.com
aaphoto 2011 AAPHOTO(1)