Sponsored Content
Operating Systems Linux Fedora Bash shell problem on Fedora Linux Post 303010069 by RudiC on Tuesday 26th of December 2017 04:42:15 AM
Old 12-26-2017
It's the three non-printing terminal reset characters at the end of the PS1 string that increase the char count output and thus the "length" of the prompt string that the shell takes into account. Try embedding those by enclosing in the correct codes. man bash:

Quote:
PROMPTING
.
.
.
\[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
\] end a sequence of non-printing characters
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem with while loop in BASH shell

I have file named script1 as follows: #!/bin/bash count="0" echo "hello" echo "$count" while do echo "$count" count=`expr $count + 1` done ----------- when I run it, I get ./script1: line 9: syntax error near unexpected token `done' ./script1: line 9: `done' I... (6 Replies)
Discussion started by: npatwardhan
6 Replies

2. Shell Programming and Scripting

problem using arrow keys in bash shell

hello everybody, as many, I have a problem with a script... I wrote a shell script in which I want to read a variable value. the problem is that I can't use the arrow keys. Here is the script I use : #!/bin/bash stty erase ^H read foune echo "$foune" exit 0; the problem is... (2 Replies)
Discussion started by: Moumou
2 Replies

3. Shell Programming and Scripting

rm:command not found in linux Bash shell script

Hi All, Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux Issue: While executing shell scripts in bash shell, following error messages are thrown: rm:command not found On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Discussion started by: a1_win
9 Replies

4. Shell Programming and Scripting

Problem with bash shell script program

Hi, This is my program. #!/bin/bash today=`date +"%b-%d-%Y"` SERVICE="pbxconnect.php" if ; then echo "pbx program is running" else nohup php pbxconnect.php > logpbx-$today.txt & fi On executing using "sh myprogram.sh" , i get the following error. myprogram.sh: line 4: ' My... (7 Replies)
Discussion started by: gskumar1234
7 Replies

5. Shell Programming and Scripting

PLEASE HELP! LINUX BASH SHELL SCRIPT

PLEASE HELP! NEED LINUX SCTIPT Need to write a bash shell script to show information of employees of a department from a company data set. The script should accept a project number (1/2/3/10/20/30) and output * the name of the project * the name of the manager of the controlling... (1 Reply)
Discussion started by: help123
1 Replies

6. Homework & Coursework Questions

LINUX Bash Shell Script

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: Write a bash shell script that presents work information of employees of a department from a company data... (1 Reply)
Discussion started by: help123
1 Replies

7. Shell Programming and Scripting

problem with rsh in bash shell

Hello All, I am trying to gather output of df -k from remote server to local server using below line: rsh <host> df -k >/tmp/space_remote_host.txt Why above throws following error message:(I've deleted the IP address in below chunk) connect to address ..: Connection refused Trying... (2 Replies)
Discussion started by: InduInduIndu
2 Replies

8. Shell Programming and Scripting

UNIX Korn Shell to Linux Bash

Migrating Unix batch jobs (Korn Shell) running in HP-UX server to Linux environment. Hi All Please help me to understand the easiest way to migrate Kernel Shell scripts to Linux Bash. Also let me know 1. Any automated scripts or tools available for this. 2. Challenges and issues... (5 Replies)
Discussion started by: cpremesh
5 Replies

9. Shell Programming and Scripting

Initialize file name bash shell - Linux

I am trying to initialize a file name in bash but not having much luck. For example, one of my bash scripts outputs a file named "FILE_1000G.vcf". I would like to rename FILE to match with the user's name. This is my code: set -e echo "Please enter your filename:" read filename rename... (6 Replies)
Discussion started by: Geneanalyst
6 Replies

10. UNIX for Beginners Questions & Answers

Bash Shell Linux

I have a csv file that looks like this Name,Food,Sport James,Curry,Gym Darren,Pizza,Football Jim,Fish,Hockey James,Sushi,Tennis My code looks like this IFS="," sed 1d $file_name | while read Name Food Sport do mkdir -p $Name #echo "==================" #echo "Name: $Name" (3 Replies)
Discussion started by: darklord173
3 Replies
hp(1)							      General Commands Manual							     hp(1)

NAME
hp - handle special functions of HP2640 and HP2621-series terminals SYNOPSIS
DESCRIPTION
supports special functions of the Hewlett-Packard HP 2640 and HP 2621 series of terminals, with the primary purpose of producing accurate representations of most output. A typical use is: Regardless of the hardware options on a given terminal, tries to do sensible things with underlining and reverse line-feeds. If the termi- nal has the ``display enhancements'' feature, subscripts and superscripts can be indicated in distinct ways. If it has the ``mathematical- symbol'' feature, Greek and other special characters can be displayed. Options recognizes the following options: Specify that your terminal has the ``display enhancements'' feature, to make maximal use of the added display modes. Overstruck characters are presented in the Underline mode. Superscripts are shown in Half-bright mode, and subscripts in Half-bright, Underlined mode. If this flag is omitted, assumes that your terminal lacks the ``display enhancements'' feature. In this case, all overstruck characters, subscripts, and super- scripts are displayed in Inverse Video mode; that is, dark-on-light, rather than light-on-dark. Request minimization of output by removing new-lines. Any contiguous sequence of 3 or more new-lines is converted into a sequence of only 2 new-lines; that is, any number of successive blank lines produces only a single blank output line. This allows you to retain more actual text on the screen. DIAGNOSTICS
The representation of a line exceeds 1,024 characters. RETURN VALUE
returns zero for normal termination, and 2 for all errors. WARNINGS
An ``overstriking sequence'' is defined as a printing character followed by a backspace followed by another printing character. In such sequences, if either printing character is an underscore, the other printing character is shown underlined or in Inverse Video; otherwise, only the first printing character is shown (again, underlined or in Inverse Video). Nothing special is done if a backspace is adjacent to an ASCII control character. Sequences of control characters (e.g., reverse line-feeds, backspaces) can make text ``disappear''; in partic- ular, tables generated by that contain vertical lines will often be missing the lines of text that contain the ``foot'' of a vertical line, unless the input to is piped through (see col(1)). Although some terminals do support numerical superscript characters, no attempt is made to display them. SEE ALSO
col(1), neqn(1), nroff(1), tbl(1). hp(1)
All times are GMT -4. The time now is 08:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy