Difficult problem: Complex text file manipulation in bash script.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Difficult problem: Complex text file manipulation in bash script.
# 15  
Old 09-21-2011
So. Any ideas? Is what I'm trying to do possible?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question
CHECKBASHISMS(1)					      General Commands Manual						  CHECKBASHISMS(1)

NAME
checkbashisms - check for bashisms in /bin/sh scripts SYNOPSIS
checkbashisms script ... checkbashisms --help|--version DESCRIPTION
checkbashisms, based on one of the checks from the lintian system, performs basic checks on /bin/sh shell scripts for the possible presence of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected. Note that the definition of a bashism in this context roughly equates to "a shell feature that is not required to be supported by POSIX"; this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability. In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide options for stricter checking. OPTIONS
--help, -h Show a summary of options. --newline, -n Check for "echo -n" usage (non POSIX but required by Debian Policy 10.4.) --posix, -p Check for issues which are non POSIX but required to be supported by Debian Policy 10.4 (implies -n). --force, -f Force each script to be checked, even if it would normally not be (for instance, it has a bash or non POSIX shell shebang or appears to be a shell wrapper). --extra, -x Highlight lines which, whilst they do not contain bashisms, may be useful in determining whether a particular issue is a false posi- tive which may be ignored. For example, the use of "$BASH_ENV" may be preceded by checking whether "$BASH" is set. --version, -v Show version and copyright information. EXIT VALUES
The exit value will be 0 if no possible bashisms or other problems were detected. Otherwise it will be the sum of the following error val- ues: 1 A possible bashism was detected. 2 A file was skipped for some reason, for example, because it was unreadable or not found. The warning message will give details. SEE ALSO
lintian(1). AUTHOR
checkbashisms was originally written as a shell script by Yann Dirson <dirson@debian.org> and rewritten in Perl with many more features by Julian Gilbey <jdg@debian.org>. DEBIAN
Debian Utilities CHECKBASHISMS(1)