Sponsored Content
Top Forums Shell Programming and Scripting ERP - MES Interface - several function Post 302774509 by Noobie1995 on Saturday 2nd of March 2013 08:04:59 AM
Old 03-02-2013
Great, it works but you can imagine it brings me to some more questions:
1. why I have to pass the value variable into ""?
2. I have extended the code (green lines) and the code brings the previous[incorrect result]?

Code:
#!/bin/bash
fkt_auffuellen()
{
case $1 in
 "C")
   if [ ${#2} -eq $3 ]; then
    value=$2
   elif [ ${#2} -lt $3 ]; then 
    value="$(printf "%-$3s" $2)"
   else
    value="$(printf "%.$3s" $2)"
fi;; 
 "N")
;;
 "D")
;;
esac
}
vorg_nr_t=C
vorg_nr="AUFTRAG005-010010"
vorg_nr_l=40
fkt_auffuellen $vorg_nr_t $vorg_nr $vorg_nr_l
vorg_nr="$value"
echo $vorg_nr

 

8 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Linux based Open Source ERP System - CK-ERP

Hi, folks, I have developed CK-ERP, which is an open source accounting / MRP / ERP / CRM system that runs on top of multiple middlewares. It provides accounting and back office functionalities to SMEs and utilizes the underlying middleware to administer accounts/groups. Details about and... (0 Replies)
Discussion started by: chiukay
0 Replies

2. UNIX for Dummies Questions & Answers

Command 'rm -f -r "0yfOYy-0008Nq-2j-32233-K"' failed with return code 1 and error mes

I would like to know what means this error and how to fix it Command 'rm -f -r "0yfOYy-0008Nq-2j-32233-K"' failed with return code 1 and error message Thank you (3 Replies)
Discussion started by: linuxbee
3 Replies

3. Programming

Compilation problem with Posix Mes Q

Hi #include "training.h" #include <mqueue.h> // for posix mqs int main(int argc,char *argv) { int opt,flag; mqd_t msq; // msg q type flag=O_RDWR|O_CREAT; while((opt =getopt(argc,argv,"e")) != -1) { switch(opt) { case 'e': ... (4 Replies)
Discussion started by: kumaran_5555
4 Replies

4. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

5. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

6. UNIX and Linux Applications

CK-ERP (Open Source Edu / ERP / CRM / MRP) v.0.30.1 released

Hi, folks, A new release, v.0.30.1, of CK-ERP, has been posted, at SourceForge.Net, sourceforge.net/projects/ck-erp . New features comprise seven new modules (ck-teacher, ck-counsellor, ck-student, ck-applicant, ck-family, ck-registrar, ck-eduadmin) for deployment within educational... (0 Replies)
Discussion started by: chiukay
0 Replies

7. IP Networking

Need a bridge from an ethernet interface to a serial interface

This is my situation DOS pc serial cable (sl0) Linux Pc eth1 192.168.0.10 <-------------------->192.168.0.2 <------------>192.168.0.1 (router) I connected the linux pc and the dos pc with a SLIP (serial line internet protocol), so they can communicate in the sl0 interface. ... (3 Replies)
Discussion started by: mghis
3 Replies

8. War Stories

Project - ERP-MES Interface

Hi all, that's my personal "war story" and probably a beginning of a never ending love story. It is roughly 8 weeks ago, I've got a training for a new ERP system. In front of the training my boss mentioned it based on a unix. Great, I have been always interested in but I don't know why I... (2 Replies)
Discussion started by: Noobie1995
2 Replies
set_color(1)                                                           fish                                                           set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy