Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Bash does not wrap long lines correctly Post 302826815 by MadeInGermany on Thursday 27th of June 2013 10:23:34 AM
Old 06-27-2013
I guess there is a bug in your bash, or there is a bug in the terminal definition it uses, or it was build with a different one.
What's your OS?
What's the path to bash?
Code:
uname
type bash

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Re: Long command lines

Hello, AIM: Need to test for the presence of some files (*.F) in a certain directory. having a problem with this line is ksh: if test `ls $SOMEDIR/dir/*.F \ 2>/dev/null|wc -w` -eq 0 Basically testing for the presence of *.F files in the specified directory. If the return... (4 Replies)
Discussion started by: enoch
4 Replies

2. UNIX for Dummies Questions & Answers

removing lines in a too long file

HI, i need to remove about a 3000000 lines in a "too long file", without using vi editor. Im using hp-ux 11.0. (4 Replies)
Discussion started by: Goodfella
4 Replies

3. Shell Programming and Scripting

How to get BASH to interpret pipes in a string correctly?

In a BASH library I'm creating, I have two functions that look like: function check_process { PIDFILE=$1 if ; then PID=`cat $PIDFILE` if && ; then return 1 fi; fi; return 0 } function fork_process { CMD=$1 PIDFILE=$2 ... (2 Replies)
Discussion started by: neked
2 Replies

4. UNIX for Dummies Questions & Answers

Lines too long error

Hi Gurus, I have a big file having around 5000 lines. What I need to do is as below. $cat myfile aaaa bbbb ccc ddd ... I want the output to be as below: 'aaaa,'bbbb','cccc'.... For this I have written something like this code: vi sac.txt |nawk '{printf NR","}'>ss code: (2 Replies)
Discussion started by: thana
2 Replies

5. Shell Programming and Scripting

splitting long string into several lines?

I'm using a barcode scanner to grab ISBNs. Unfortunately, short of hitting "enter" each time (not easy while on a ladder), there's no good way to split it up. So I scanned it into a series of long lines in notepad. Now, I need to split each line into 12-number lines. instead of:... (4 Replies)
Discussion started by: mbourgon
4 Replies

6. Shell Programming and Scripting

Wrap lines with awk to create SQL script

Greetings! Some of my files list hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like "No error", else I display the error from the file itself. I came up with this (with help) for myfile in `find . -name... (2 Replies)
Discussion started by: alan
2 Replies

7. Shell Programming and Scripting

Geographical distance between long and lat in bash

Does anyone know of any script or packages that allow the calculation of the geographical distance between two points of lat/long from within a bash shell? I have been searching the web for the past few days and none of the options seem compatible with bash variables... (eg. geodist) Many... (3 Replies)
Discussion started by: lily-anne
3 Replies

8. UNIX for Dummies Questions & Answers

sed and awk for long lines

Hi, I'm trying make a variable length file to a fixed length of 4000. I'm to pad spaces on the right of a record if length is less than 4000 to make the record length 4000. I'm trying to use the below commands awk '{printf "%-4000s\n", $0}' inputfile.dat > outputfile.dat sed -e :a... (12 Replies)
Discussion started by: uxusr
12 Replies

9. Shell Programming and Scripting

Perl one liner to wrap comment lines

Greetings fellow scripters. I find myself editing multiple files, sometimes with the same bits of information. My bash script, a changelog, and a plist file (OS X). Once I realized this, I thought why not script part of this process (and so it begins). In any case, I've solved several of the... (1 Reply)
Discussion started by: reid
1 Replies

10. Programming

Fork and Execvp Not Executing Bash Commands From C correctly.

I had been looking at page 75 of this online book: http://richard.esplins.org/static/downloads/linux_book.pdf I've used the system function in C to call bash commands before, but wanted to learn this way too. The solution in the book worked perfectly. However, I tried changing the simple "ls -l... (3 Replies)
Discussion started by: Azrael
3 Replies
OPEN(1) 							     Linux 1.x								   OPEN(1)

NAME
open - start a program on a new virtual terminal (VT). SYNOPSIS
open [-c vtnumber] [-s] [-u] [-l] [-v] [--] command command_options DESCRIPTION
open will find the first available VT, and run on it the given command with the given command options, standard input, output and error are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the envi- ronment variable $SHELL is used. OPTIONS -c vtnumber Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work. -s Switch to the new VT when starting the command. The VT of the new command will be made the new current VT. -u Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with -c or -l. -l Make the command a login shell. A - is prepended to the name of the command to be executed. -v Be a bit more verbose. -w wait for command to complete. If -w and -s are used together then open will switch back to the controlling terminal when the command completes. -- end of options to open. NOTE
If open is compiled with a POSIX (Gnu) getopt() and you wish to set options to the command to be run, then you must supply the end of options -- flag before the command. EXAMPLES
open can be used to start a shell on the next free VT, by using the command: open bash To start the shell as a login shell, use: open -l bash To get a long listing you must supply the -- separator: open -- ls -l SEE ALSO
login(1), doshell(8), switchto(1). AUTHOR
Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk> -w idea from "sam". 19 Jul 1996 V1.4 OPEN(1)
All times are GMT -4. The time now is 12:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy