Sponsored Content
Top Forums Shell Programming and Scripting Replace space and vertical bar with verical bar Post 302299676 by ldapswandog on Friday 20th of March 2009 07:12:39 PM
Old 03-20-2009
You can get sed to remove the space prior to the vertical bar and create a new file. You can then validate the output file and then mv back to the original file name

Code:
sed -e 's/\s|/|/g' inputFile > outputFile

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: missutoomuch
2 Replies

2. Shell Programming and Scripting

progress bar

hi all, in shell script (ksh), how do i write a progress bar ?? i have a script which searches files and while its searching i am currently printing out "." and if it finds what its searching for the script prints out the name of the file e.g .................. firstFile.txt... (2 Replies)
Discussion started by: cesarNZ
2 Replies

3. Programming

A progress bar in C

Hello, it's me again...:eek: I need to create a progress bar in C, but i have no idea on how to do it. i want it to output something like this: Progress: 58% But i can't get it to work. Could you please post an example progress bar written in ANSI C? Thanks (4 Replies)
Discussion started by: Zykl0n-B
4 Replies

4. Shell Programming and Scripting

Progress bar for cp

I'm trying to use this code to get a progress bar for cp: "Can you get cp to give a progress bar like wget?" But I'm getting these errors: stat: illegal option -- c usage: stat awk: division by zero input record number 1, file source line number 4 I'm using Mac OS X 10.6... (1 Reply)
Discussion started by: pcwiz
1 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

Progress bar

Hi Experts; Im in the process of writing a shell script for enabling an IT operations to run archiving.We use netbackup. The script is complete, though there is one bit that i need help on. Im trying to have a progess bar for the procedure.I have gone through the man page of the command in... (5 Replies)
Discussion started by: maverick_here
5 Replies

8. UNIX for Dummies Questions & Answers

Problem getting vertical bar with British keyboard layout on US (physical) keyboard

Hi, I've got a bit of a ridiculous problem and wasn't sure where to post it. I need to use the vertical bar for piping in Bash but, as per the title, am using a UK layout on a US (physical) keyboard which doesn't have a key for it in the place I'd expect. I've tried using xbindkeys and Unicode... (7 Replies)
Discussion started by: crunchgargoyle
7 Replies
Scroller(3I)						    InterViews Reference Manual 					      Scroller(3I)

NAME
Scroller, HScroller, VScroller - scrolling an interactor SYNOPSIS
#include <InterViews/scroller.h> DESCRIPTION
A scroller is an interactor that manipulates the perspective of another interactor. It contains a bar whose position and size reflect the current origin and size in the interactor's perspective. Clicking and dragging in the scroller modifies the attached interactor's perspec- tive. VScroller is a class for defining vertical scrollers, HScroller for horizontal scrollers. PUBLIC OPERATIONS
HScroller(Interactor*, int size = 0) VScroller(Interactor*, int size = 0) Create a scroller of a given size (height for a horizontal scroller, width for a vertical scroller). A zero size means to use the default size. virtual void Update() Redisplay the scroller to reflect a change in the interactor's perspective. X DEFAULTS
The ``syncScroll'' resource specifies whether the scroller should work in real-time or not. When synchronized scrolling is employed the interactor scrolls synchronously as the scroller's bar is dragged; otherwise the bar's outline follows the mouse during dragging, and the interactor is scrolled only after the user stops dragging the bar. Scrollers will scroll synchronously if their syncScroll resource is set to ``on'' or ``true.'' The state of the syncScroll attribute can be toggled temporarily by holding down the ``control'' key while the scroller is manipulated. SEE ALSO
Interactor(3I), Perspective(3I) InterViews 15 June 1987 Scroller(3I)
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy