Sponsored Content
Top Forums Shell Programming and Scripting Need script for Itanium server Post 302642911 by bakunin on Friday 18th of May 2012 07:43:27 AM
Old 05-18-2012
Code:
#!/bin/ksh

typeset chCmd="/path/to/Generateadd.sh -ip"
typeset pDir=/path/to/your/directory
typeset pFile=""
typeset chIP=""

ls $pDir | while read pFile ; do
     chIP="${pFile%.csv}"             # chop off the extension
     chIP="${chIP#card_}"             # chop off the leading "card_"

     $chCmd $chIP
done

exit 0

It is a bad idea to have relative paths in scripts, so i changed ./Generateadd.sh to a call with the absolute path. If you use relative paths in scripts that means the script will work in one directory but not in another.

I hope this helps.

bakunin

Last edited by bakunin; 05-18-2012 at 08:49 AM..
 

10 More Discussions You Might Find Interesting

1. HP-UX

How Many CPUs? (Itanium)

I've got a dual CPU Itanium server that we use for hosting our Oracle database. It's been up and running fine for quite some time. So well, in fact, that I haven't even looked at 'top' in a while. Recently I needed to look at 'top' and I only see one CPU listed now. CPU0. Is there any other... (5 Replies)
Discussion started by: deckard
5 Replies

2. HP-UX

Does HP-UX On Itanium always come with PA-RISC compatibility

Does anybody know if HP-UX on Itanium always comes with backwards compatibility for PA-RISC applications? I've heard that there is an emulator called Aries which should do the trick, I just need to know if it always comes as standard with HP-UX Itanium systems. Any help would be greatly... (3 Replies)
Discussion started by: nialler
3 Replies

3. UNIX for Advanced & Expert Users

What Are the Differences Between Itanium and x86_64 CPUs?

This is definitely a "stupid" question, but I can't think of anywhere else to ask it, so here goes. My knowledge of CPU history on big iron machines starts with the last DEC Alphas, a short stint with Sun servers, PA-RISC and Itanium, Intel 486s on the desktop before that, and Motorola 68000 CPUs... (4 Replies)
Discussion started by: deckard
4 Replies

4. HP-UX

Install tcsh on HP-UX 11.31 itanium

I have 2 servers , both are HP-UX specifications as follows : (1) HP-UX adroit B.10.20 A 9000/785 2013264127 one-user license (2) HP-UX xen B.11.31 U ia64 2662515494 one-user license First one has tcsh installed adroit:/home/seo/hitendra 22 ] which tcsh /usr/bin/tcsh But the... (1 Reply)
Discussion started by: hiten.r.chauhan
1 Replies

5. What is on Your Mind?

Oracle stops Itanium development

According to the press release, Oracle will stop supporting the Itanium platform altogether, including all databases. Just out of curiosity: what selling-points will there be left for Itanium servers? From personal experience I know that the ports of FLOS software are mostly very out of date... (4 Replies)
Discussion started by: pludi
4 Replies

6. UNIX for Advanced & Expert Users

Compiling git in HPUX 11.31 itanium

Hello, Would you know the steps on how to compile git command in HPUX? (1 Reply)
Discussion started by: SystemAddict
1 Replies

7. HP-UX

Gcc and C/aC++ co-existing on HP-UX Itanium system

Our company developed applications on an HP-UX 11 Itanium system using gcc. We did not have HP's C/aC++ system installed. We are now attempting to install/run on a customer system that already has C/aC++ on it. Can gcc (gcc-4.3.2, or just the runtime libraries gcclib-4.3.2) be installed and... (1 Reply)
Discussion started by: northb
1 Replies

8. HP-UX

Shc command for hp UNIX 11.23 itanium

(2 Replies)
Discussion started by: sagar_1986
2 Replies

9. HP-UX

PDFtk for HP-UX 11.31 Itanium 64

Hi Unix and HP-US experts, I have a need to encrypt/give password to PDF files in HP-UX servers, but unfortunately I am new to unix and hp-ux. My server is HP-UX 11.31 running on Itanium 64 bit architecture. I have downloaded and installed PDFtk from this link:... (1 Reply)
Discussion started by: villium
1 Replies

10. HP-UX

Installation of gnome 1.4 for HP itanium

Hi I can't download gnome from HP website because links are broken: I can only download patch for Gnome. Can you help me? --- Post updated at 05:18 PM --- I realized that I have to register on their website with the software depot to download it. (0 Replies)
Discussion started by: gbudny
0 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 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy