Sponsored Content
Top Forums Shell Programming and Scripting To display 1 or 2 space bar output Post 98819 by missutoomuch on Saturday 11th of February 2006 08:14:12 AM
Old 02-11-2006
To display 1 or 2 space bar output

Dear Experts,

Please help to advice me for the command to show the output below:-
1) If i input 3, 201, 222 then the output should show 1 space bar as below
201 222
2) If i input 4, 201, 1509 then the outpur should show 2 span bar as below
201 1509

3 will be for 1 space bar between 201 and 222
4 will be for 2 space bar between 201 and 1509

Here below is my script but it cannot work. Please help correct

Code:
echo "Please enter the number of digit BTS-ID"
read digit 
echo "Please enter MM#"
read mm
echo "Please enter BTS#"
read bts 

if ["digit" = 3]
  then
    echo "$mm  $bts" > mmbts
    exit 0

  else
    echo "$mm $bts" > mmbts
fi


Last edited by Perderabo; 02-11-2006 at 04:16 PM.. Reason: Add code tags for readability
 

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
pomerge(1)						      Translate Toolkit 1.9.0							pomerge(1)

NAME
pomerge - Merges XLIFF and Gettext PO localization files SYNOPSIS
pomerge [--version] [-h|--help] [--manpage] [--progress PROGRESS] [--errorlevel ERRORLEVEL] [-i|--input] INPUT [-x|--exclude EXCLUDE] [-o|--output] OUTPUT [-t|--template TEMPLATE] [--mergeblanks] [--mergefuzzy] [--mergecomments] DESCRIPTION
Snippet file produced by pogrep or updated by a translator can be merged into existing files See: http://translate.source- forge.net/wiki/toolkit/pomerge for examples and usage instructions OPTIONS
--version show program's version number and exit -h/--help show this help message and exit --manpage output a manpage based on the help --progress show progress as: dots, none, bar, names, verbose --errorlevel show errorlevel as: none, message, exception, traceback -i/--input read from INPUT in xlf, po, pot, pot formats -x/--exclude exclude names matching EXCLUDE from input paths -o/--output write to OUTPUT in po, pot, pot, xlf formats -t/--template read from TEMPLATE in pot, po, pot, xlf formats --mergeblanks whether to overwrite existing translations with blank translations (yes/no). Default is yes. --mergefuzzy whether to consider fuzzy translations from input (yes/no). Default is yes. --mergecomments whether to merge comments as well as translations (yes/no). Default is yes. Translate Toolkit 1.9.0 pomerge(1)
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy