Sponsored Content
Top Forums Shell Programming and Scripting To display 1 or 2 space bar output Post 98827 by Perderabo on Saturday 11th of February 2006 03:25:16 PM
Old 02-11-2006
You don't need to enter the length of a variable. You can find it with #. And you can typeset a variable so it is always at least 4 characters...spaces added as needed.

Code:
#! /usr/bin/ksh

typeset -R4 rbts
echo "Please enter MM#"
read mm
echo "Please enter BTS#"
read bts

echo bts is $bts which has ${#bts} digits
rbts=$bts
echo "$mm $rbts"
exit 0

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Want display a line with space in file by unix script

HI , I am having a file as -----------------a.out------------------- Hi I am unix developer using hp unix this is a test --------------------------------------- i need to read each line by a unix script of the file and to print in console with the space in the line as ... (9 Replies)
Discussion started by: arunkumar_mca
9 Replies

2. Shell Programming and Scripting

display free space on a unix server

I need to display the amount space avalible on a unix server in an html webpage, which will automatically update every hour. I am able to do so using a javascript in a windows based server. How would i go about doing this in a unix server. Any help, suggestions, anything would be great. thanks. (3 Replies)
Discussion started by: davwel
3 Replies

3. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

4. Shell Programming and Scripting

Replace space and vertical bar with verical bar

I am trying to get sed, tr or awk to search a file that contains records with fields delimited by the vertical bar | and replace the occurrences in the records where the vertical bar is preceded by a space " |" with a vertical bar. Sample data record zelli |||59 Stonewall Dr ||W Barnstable |MA... (2 Replies)
Discussion started by: clintrpeterson
2 Replies

5. Shell Programming and Scripting

Pressing "Enter/Space bar" using Net::TELNET? in Perl

I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router. How is this done? (0 Replies)
Discussion started by: xmaverick
0 Replies

6. Linux

Space bar issue in Vi editor on Linux - Solaris

Hi I have a process generating a file in Solaris. Now we have migrated the process to Linux. When we open the file in vi on solaris and hit space bar, it stops after reaching the end of line. But in linux it continues to go on the next line. So I want to know whether the difference is between the... (4 Replies)
Discussion started by: sudhamacs
4 Replies

7. Shell Programming and Scripting

how to display column value in a row with space as delimeter

Hi I need to write a small script to kill the process id of particular job in one shot , Example > ps PID TTY TIME COMMAND 16280 pts/70 0:00 sh 16278 pts/70 0:00 rlogind 16197 pts/70 0:00 ps 1234 pts/70 0:00 runflow 2341 pts/70 0:00 runflow 12673 pts/70 ... (6 Replies)
Discussion started by: mani_isha
6 Replies

8. UNIX for Dummies Questions & Answers

Display Pie Chart/Bar Graph in microsoft outlook email using UNIX commands/Shell scripts

I have a shell script which executes to write html codes into a text file. My next step is to email the text file so that receiving person (people who i send email to) should be able to see pie/chart or bar graph (whatever i design in my code) in their email. Following is the example of a sample... (7 Replies)
Discussion started by: bikerboy
7 Replies

9. Shell Programming and Scripting

Help with script to display space usage

Hi all, I am looking for help with a script for displaying the space available from a df - h command for / (root). The problem is: If it is below 700 MB I have jobs that are failing... Is there a way I can do a calculation? If it above 700 MB it is good, if it is below 700 MB it will fail.... (5 Replies)
Discussion started by: gartie
5 Replies

10. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
TAGPENDING(1)															     TAGPENDING(1)

NAME
tagpending - tags bugs that are to be closed in the latest changelog as pending SYNOPSIS
tagpending [options] DESCRIPTION
tagpending parses debian/changelog to determine which bugs would be closed if the package were uploaded. Each bug is then marked as pending, using bts(1) if it is not already so. OPTIONS
-n, --noact Check whether any bugs require tagging, but do not actually do so. -s, --silent Do not output any messages. -v, --verbose List each bug checked and tagged in turn. -f, --force Do not query the BTS, but (re)tag all bugs closed in the changelog. --comments Include the changelog header line and the entries relating to the tagged bugs as comments in the generated mail. This is the default. Note that when used in combination with --to, the header line output will always be that of the most recent version. --no-comments Do not include changelog entries in the generated mail. -c, --confirm Tag bugs as both confirmed and pending. -t, --to version Parse changelogs for all versions strictly greater than version. Equivalent to dpkg-parsechangelog's -v option. -i, --interactive Display the message which would be sent to the BTS and, except when --noact was used, prompt for confirmation before sending it. -w, --wnpp For each bug that does not appear to belong to the current package, check whether it is filed against wnpp. If so, tag it. This allows e.g. ITAs and ITPs closed in an upload to be tagged. SEE ALSO
bts(1) and dpkg-parsechangelog(1) COPYRIGHT
This program is Copyright 2008 by Adam D. Barratt <adam@adam-barratt.org.uk>. The shell script tagpending, on which this program is based, is Copyright 2004 by Joshua Kwan <joshk@triplehelix.org> with changes copyright 2004-7 by their respective authors. This program is licensed under the terms of the GPL, either version 2 of the License, or (at your option) any later version. Debian Utilities 2013-12-23 TAGPENDING(1)
All times are GMT -4. The time now is 06:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy