Sponsored Content
Top Forums Shell Programming and Scripting Difficult problem: Complex text file manipulation in bash script. Post 302557267 by tinman47 on Tuesday 20th of September 2011 06:07:38 PM
Old 09-20-2011
Sorry I should've been more clear.

How could I design the script to interact with and manipulate a text file? I know cat, sed, and gawk can edit files, but they don't move around the text file. How could I move around the file and edit manipulate text?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash file manipulation help

Hello, I'm writing a bash script and I have a question. Here's what I'm doing: I have a file called inv.dat which contains the following: B102:Action Figure - Teacher:79 B103:Bike - Purple:23 B104:Baseball:25 B105:Cricket Bat:15 B101:Action Figure - Fireman:15 B100:Flame-Thrower:25 ... (2 Replies)
Discussion started by: netmaster
2 Replies

2. Shell Programming and Scripting

Shell script text file manipulation.

Hello, I have mysql binary file which logs all the database queries and i to insert all queries log in to database. First i coverted binary file to text file. and start playing with it. Text file contains following queries, some samples are, SET INSERT_ID=1; INSERT INTO test... (0 Replies)
Discussion started by: mirfan
0 Replies

3. Shell Programming and Scripting

AWK manipulation in bash script

EDIT: This has been SOLVED. Thanks! Greetings everyone, I've posted a few threads with some quick help questions, and this is another one of those. I can't post enough gratitude for those much more knowledgeable than myself who are willing to give good advice for my minor issues. Now,... (2 Replies)
Discussion started by: Eblue562
2 Replies

4. Shell Programming and Scripting

Please help. Complicated text file manipulation problem

Let me try my best to give you a picture of what I'm trying to do. Once again I'm sorry for the essay thats coming up. I programmed a rather large library of script functions to deal with input, displaying ANSI block graphics, playing sounds, and refining the terminal and so on. I also designed... (8 Replies)
Discussion started by: tinman47
8 Replies

5. Shell Programming and Scripting

Been working since 25+ hrs: Bash Script to rename files supposedly direct but difficult to execute

:wall::wall::wall: Hi I have horrible script below, need help in renaming ls -l output into new filename format: Desired output: cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename localuser@localuser:~ vi... (3 Replies)
Discussion started by: wolf@=NK
3 Replies

6. Shell Programming and Scripting

Bash - file manipulation

I need to change a file like this: John Smith;http://www.profile1.com John Smith;http://www.profile2.com Frank Olsen;http://www.profile3.com Frank Olsen;http://www.profile4.com Into: John Smith;http://www.profile1.com;http://www.profile2.com Frank... (2 Replies)
Discussion started by: locoroco
2 Replies

7. Shell Programming and Scripting

Complex text parsing with speed/performance problem (awk solution?)

I have 1.6 GB (and growing) of files with needed data between the 11th and 34th line (inclusive) of the second column of comma delimited files. There is also a lot of stray white space in the file that needs to be trimmed. They have DOS-like end of lines. I need to transpose the 11th through... (13 Replies)
Discussion started by: Michael Stora
13 Replies

8. Shell Programming and Scripting

Bash script to replace text file from a lookup file

Hi. I need assistance with the replacing of text into a specific file via a bash script. My bash script, once run, currently provides a menu of computer names to choose.The script copies onto my system various files, depending what computer was selected in the menu.This is working OK. Now, I... (1 Reply)
Discussion started by: jonesn2000
1 Replies

9. Shell Programming and Scripting

Text manipulation with sed/awk in a bash script

Guys, I have a variable in a script that I want to transform to into something else Im hoping you guys can help. It doesn't have to use sed/awk but I figured these would be the simplest. DATE=20160120 I'd like to transform $DATE into "01-20-16" and move it into a new variable called... (8 Replies)
Discussion started by: dendenyc
8 Replies

10. Shell Programming and Scripting

Help with Complex Bash Script

I have an FTP server with thousands of Invoices. All Invoices are in a folder called /volume1/MBSInvoices/ Monthly invoices are added to that folder every month. Here is a sample filename of the Invoices: invoice_1_20170101_10010052_10020052_10030052_JOHNDOE.pdf the Account ID is the... (6 Replies)
Discussion started by: badr777
6 Replies
dasher(1)							   User Commands							 dasher(1)

NAME
dasher - graphical predictive text entry system SYNOPSIS
dasher [OPTIONS] [filename] DESCRIPTION
Dasher is an information-efficient text-entry interface, driven by natural continuous pointing gestures. Dasher is a competitive text-entry system wherever a full-size keyboard cannot be used. OPTIONS
dasher takes the following options: -a, --appstyle=STYLE Application style. STYLE can be any of traditional, direct, compose, or fullscreen. The default is whatever was specified on the previous invocation of Dasher, or traditional when Dasher is started for the first time. -?, --help Describe command line options. --help-options Describe the options available with --options. -o, --options [option=value[,option=value...]] Override stored options. Options values are remembered for subsequent invocations of Dasher. USAGE
The main Dasher interface is a window with a blank background containing a column of letters on the right hand side. Click the mouse but- ton to start. When the pointer is to the right of the crosshair the screen will zoom towards the point underneath the mouse pointer. To select a letter, move the mouse pointer into it and watch how it zooms underneath the crosshair. A new column of letters will appear. Staying within the box for the selected letter, move the pointer over one of these letters to select it as the next letter. Moving the mouse pointer to the left of the crosshair, or outside of the box for previously selected letters, allows you to change previously selected letters. Application Styles traditional Dasher displays an edit box above the main window. Text entered via Dasher will appear in the edit box allowing the text to be edited directly. direct The edit box is not displayed. Dasher runs without focus and the text goes into whatever window does have focus. This way you can use it more practically to run your desktop. fullscreen dasher expands to the entire screen. MENUS
File New Clear the edit box and associate a random filename with it. Open Read a text file into the edit box for further editing. Save Save the contents of the edit box to its associated file. Save as Save the contents of the edit box to a selected file. Append to file Add the contents of the edit box to the end of a selected file. Import training text Use a file to further improve Dasher's prediction of the next letters to present (for instance, a training file containing scien- tific terms to add to the initial English training). Training files must be UTF-8 encoded. Quit Exit Dasher. Edit Cut Remove the highlighted text from the edit box and copy it to the clipboard. Copy Copy the highlighted text from the edit box to the clipboard but don't remove it. Paste Paste the contents of the clipboard into the edit box at the position of the cursor. Copy all Copy the entire contents of the edit box to the clipboard. Select all Highlight all of the text in the edit box. Options Preferences Opens the preferences dialog. Help About Dasher Display information about the current version of Dasher THE PREFERENCES DIALOG
The preferences dialog is split into several panes. Alphabet Choose a different alphabet. Dasher will automatically retrain itself if the alphabet specified training file is present. Colour Choose a different colour scheme. Control Alter various control options One dimensional mode Map the Y position of the mouse to a 2 dimensional position on the Dasher canvas (useful for limited mobility users) Eyetracker mode Similar to one dimensional mode, but behaves normally except at the right-hand side of the canvas. Designed for eyetracker users. CONVERTING TRAINING FILES TO UTF-8 Dasher requires that training files be in the UTF-8 format, whereas most text files are likely to be in ISO-8859 format. This doesn't mat- ter for plain text, but accented characters are encoded differently. In order to convert them, use the iconv(1) program. For instance, if your training file is in ISO-8859-1 format (Western European), run iconv -f ISO-8859-1 -t UTF-8 trainingfile >newtrainingfile FILES
/usr/share/doc/dasher Directory containing system-wide configuration files. ~/.dasher Directory containing user specific configuration files. Dasher will utilise files of the following form from both of these directories: alphabet.ALPHABET.xml The files defining the alphabets available to Dasher. colour.SCHEME.xml The files defining the colour schemes available to Dasher. training_LANGUAGE*.txt Files containing the training data used by Dasher. These are UTF-8 encoded text and should contain a representative sample of the relevant language. User specific training files can be used to augment system wide data. Refer to the Dasher manual for more information regarding the format and editing of these files. AUTHOR
The Dasher Project <dasher@mrao.phy.cam.ac.uk>. SEE ALSO
The Dasher project web page is <http://www.inference.phy.cam.ac.uk/dasher/> 4.11 2008-02-28 dasher(1)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy