Help with Flat Files Please!! BASH (New User)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with Flat Files Please!! BASH (New User)
# 1  
Old 02-27-2006
Question Help with Flat Files Please!! BASH (New User)

Hello All,

I am brand new to the UNIX world and so far and very intrigued and enjoy scripting. This is just a new language for me. I would really like assistance with the below request. Any help would be greatly appreciated!

I want to create a flat file in Vi that has a header field and entries in each field. I then need to run a script that will ask me what I'm looking for and then return the data to a file.

Example:

First_Name,Last_Name,Phone#,City,State
John,Doe,5055551212,Albuquerque,NM
Jane,Doe,8085551212,Maui,HI
Bob,Doe,8085551212,Honolulu,HI

Now I would like the script to ask me "what are you looking for? First_Name, Last_Name, Phone#, City, State.

Then say for example I choose State.

It would then reply with choose a State.

I would enter HI

It would then output all entries from the State of HI to a file.

Is this possible or am I expecting to much from this script?

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Create a bash array from a flat file of whitespaces only.

Hi guys and gals... MacBook Pro. OSX 10.13.2, default bash terminal. I have a flat file 1920 bytes in size of whitespaces only. I need to put every single whitespace character into a bash array cell. Below are two methods that work, but both are seriously ugly. The first one requires that I... (7 Replies)
Discussion started by: wisecracker
7 Replies

2. Shell Programming and Scripting

Converting Multiline Files to Flat Files?

How to convert this: F1-R1 F1-R2 F1-R3 into a flat file for bash?? Each record F2-R1 F2-R2 F2-R3 F3-R1 F3-R2 F3-R3 F4-R1 F4-R2 F4-R3is on one line with all fields for that record, put into an output file. The output file should look like this when converted: F1-R1,F2-R1,F3-R1,F4-R1... (6 Replies)
Discussion started by: bud1738
6 Replies

3. Shell Programming and Scripting

Compare to flat files using awk

compare to flat files using awk .but in 4th field contains non ordered substring. how to do that. file1.txt john|0.0|4|**:25;JP:50;UY:25 file2.txt andy|0.0|4|JP:50;**:25;UY:25 (4 Replies)
Discussion started by: veeruasu
4 Replies

4. Programming

Scripting using flat files

I need some help to create a script that can do the following: I have two flat files with one column that should link the two files' information into one record: 1st Flat File - 3 columns, multiple rows: orderid, Jobnumber, Ordernumber 2nd Flat File - 2 columns, multiple rows: ... (4 Replies)
Discussion started by: Lavelle
4 Replies

5. Infrastructure Monitoring

Possible performance improvement (Bash and flat file)

Hello, I am pretty new to shell scripts and I recently wrote one that seems to do what it should but I am exploring the possibility of improving its performance and would appreciate some help. Here is what it does - Its meant to monitor a bunch of systems (reads in IPs one at a time from a flat... (9 Replies)
Discussion started by: prafulnama
9 Replies

6. Shell Programming and Scripting

Compare 2 flat files

Hi Frnds, I have a flat file with millions of records. . Now I on this. (I prefer for AWK as its gives good performance.) Old_file.txt ------------------ 1 gopi ase .... 2 arun pl ... 3 jack sutha .. 4 peter pm .. ... New_file.txt --------------- 4 peter pm .. .. ... (12 Replies)
Discussion started by: Gopal_Engg
12 Replies

7. Shell Programming and Scripting

Compare 2 flat files

Hi Gurus, I searched the forum but didnt get much info. I want to compare 2 files. 1)Newfile comes today with 2)Old file of previous day. The files are same ,just the new files might have new records sometimes. So I want to capture these new records in another file. Can anyone help... (5 Replies)
Discussion started by: ganesh123
5 Replies

8. Shell Programming and Scripting

Column names in flat files

Hi all, I want to create column names in a flat file and then load the data through some other application. For example, I have a file with emp.txt and I need column names as eno,ename,sal in the first line. The delimiter here is comma and record delimiter is end of line or unix new line. Could... (1 Reply)
Discussion started by: srivsn
1 Replies

9. UNIX for Dummies Questions & Answers

How to join flat files together under unix

Hi, I have 7 big flat files, each contains 24 million records which have been sorted by the first field delimitered by Ctrl B (002). I want to join them together side by side, eg. File A: 1^Ba^Bb 2^Bx^By .... File B: 1^Bc^Bd 2^Bm^Bn .... After merged, it should look like :... (7 Replies)
Discussion started by: xli
7 Replies

10. Shell Programming and Scripting

Flat Files

I have a flat file like this 0001 THER ULT HEAD & NECK VES 0002 THER ULTRASOUND OF HEART 0003 THER ULT PERIPHERAL VES 0009 OTHER THERAPEUTIC ULTSND 0010 IMPLANT CHEMOTHERA AGENT 0011 INFUS DROTRECOGIN ALFA 0012 ADM INHAL NITRIC OXIDE I need to conver this to a comma delimited flat file... (2 Replies)
Discussion started by: thumsup9
2 Replies
Login or Register to Ask a Question
BRAND.4TH(8)						    BSD System Manager's Manual 					      BRAND.4TH(8)

NAME
brand.4th -- FreeBSD ASCII art boot module DESCRIPTION
The file that goes by the name of brand.4th is a set of commands designed to draw the ASCII art BSD brand above the boot loader menu. The commands of brand.4th by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to loader(8) for additional commands. Before using any of the commands provided in brand.4th, it must be included through the command: include brand.4th This line is present in the default /boot/menu.rc file, so it is not needed (and should not be re-issued) in a normal setup. The commands provided by it are: draw-brand Draws the BSD brand. The brand that is drawn is configured by setting the loader_brand variable in loader.conf(5) to one of ``fbsd'' (the default) or ``none''. The position of the logo can be configured by setting the loader_brand_x and loader_brand_y variables in loader.conf(5). The default values are 2 (x) and 1 (y). The environment variables that effect its behavior are: loader_brand Selects the desired brand in the beastie boot menu. Possible values are: ``fbsd'' (default) or ``none''. loader_brand_x Sets the desired column position of the brand. Default is 2. loader_brand_y Sets the desired row position of the brand. Default is 1. FILES
/boot/loader The loader(8). /boot/brand.4th brand.4th itself. /boot/loader.rc loader(8) bootstrapping script. EXAMPLES
Set FreeBSD brand in loader.conf(5): loader_brand="fbsd" SEE ALSO
loader.conf(5), loader(8) HISTORY
The brand.4th set of commands first appeared in FreeBSD 9.0. AUTHORS
The brand.4th set of commands was written by Devin Teske <dteske@FreeBSD.org>. BSD
May 18, 2011 BSD