Sponsored Content
Top Forums Shell Programming and Scripting file moving based on file content Post 302156060 by melvyn.cochrane on Monday 7th of January 2008 05:01:16 AM
Old 01-07-2008
Assuming the files, as shown previously in the post, are as follows....

File Name : G0001.dat
The BMW is a great car, worthy of consideration.^M
This car consists of^M
^M
4 wheels^M
4 Seats^M

File Name : G0002.dat
The FIAT is your standard run of the mill car.^M
It can be used for daily^M
excursions around tow.^M
^M


File Name : G0003.dat
The VOLVO is an american vehicle.^M
This vehicle is common in^M
the following regions^M
^M
California^M
Florida^M
New York^M



Hope this helps
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Reading a file and sending mail based on content of the file

Hi Gurus, I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file. eg. if file a.txt exists then send a mail to a@a.com simillary for b.txt,c.txt etc. Thanks for your help, Nimu (6 Replies)
Discussion started by: nimu1979
6 Replies

2. Shell Programming and Scripting

Moving Content from one file to another with variables

Greetings All, Need some help, your input is appreciated. Scenario: I have five files, each has one line with comletely different content. I execute the command to combine all the five lines of content into a single file. Goal: I would like to take that single file that has the... (3 Replies)
Discussion started by: royarellano
3 Replies

3. UNIX for Dummies Questions & Answers

Changing file content based on file header

Hi, I have several text files each containing some data as shown below: File1.txt >DataHeader Data... Data... File2.txt >DataHeader Data... Data... etc. What I want is to change the 'DataHeader' based on the file name. So the output should look like: File1.txt >File1 ... (1 Reply)
Discussion started by: Fahmida
1 Replies

4. Shell Programming and Scripting

Moving a file based on size

hello, I am creating a script that is going to scan the contents of a directory, and if it finds a certain DocumentName that is a certain size (The example, DocumentName and a size of 8777) If this file exists, it needs to be moved to a directory for later removal/processing..anyone have... (7 Replies)
Discussion started by: jeffs42885
7 Replies

5. Shell Programming and Scripting

Remove the file content based on the Header of the file

Hi All, I want to remove the content based on the header information . Please find the example below. File1.txt Name|Last|First|Location|DepId|Depname|DepLoc naga|rr|tion|hyd|1|wer|opr Nava|ra|tin|gen|2|wera|opra I have to search for the DepId and remove the data from the... (5 Replies)
Discussion started by: i150371485
5 Replies

6. Red Hat

Moving of file content to another two files after searching with specific pattern

Hello, Please help me with this!! Thanks in advance!! I have a file named file.gc with the content: 1-- Mon Sep 10 08:53:09 CDT 2012 2revoke connect from FR2261; 3delete from mkt_allow where grantee = 'FR2261'; 4grant connect to FR2261 with '******'; 5alter user FR2261 comment... (0 Replies)
Discussion started by: raosr020
0 Replies

7. Shell Programming and Scripting

Shell Script to Dynamically Extract file content based on Parameters from a pdf file

Hi Guru's, I am new to shell scripting. I have a unique requirement: The system generates a single pdf(/tmp/ABC.pdf) file with Invoices for Multiple Customers, the format is something like this: Page1 >> Customer 1 >>Invoice1 + invoice 2 >> Page1 end Page2 >> Customer 2 >>Invoice 3 + Invoice 4... (3 Replies)
Discussion started by: DIps
3 Replies

8. Shell Programming and Scripting

Script for moving one file with date content in name

Dear All, I am having a database that generates daily backup files in the below format. abc_date_0010.zip. Can you please suggest a method to copy the last day's file to another location. I am trying with if statement, but having difficulty while I use the condition like if ; then ... (4 Replies)
Discussion started by: skooby
4 Replies

9. Shell Programming and Scripting

Moving files based on file name

Hi All, I have multiple files in the folder, I want to move those files into the other folder on based of name File names: Template_server1_01==> Template_server1_02==>To one directory /Server1 Template_server1_03==> Template_server2_01==> Template_server2_02==>To one... (9 Replies)
Discussion started by: sharsour
9 Replies

10. Shell Programming and Scripting

How to create file and file content based existing information?

Hi Gurus, I am SQL developer and new unix user. I need to create some file and file content based on information in two files. I have one file contains basic information below file1 and another exception file file2. the rule is if "zone' and "cd" in file1 exists in file2, then file name is... (13 Replies)
Discussion started by: Torhong
13 Replies
plotit(1)						      General Commands Manual							 plotit(1)

NAME
plotit - experiment data visualization SYNOPSIS
plotit -w FILE plotit [-lp] -q FILE [FILE]... plotit [-lp] Y FILE [FILE...] plotit [-lp] X Y FILE [FILE...] DESCRIPTION
The plotit program is a simple plotting program which can draw line plots and stripcharts using a command language similar to that of gnu- plot. It can also make quick plots of multiple data files from the command-line. Wildcards may be used in the file names. The program takes optional expressions which can be used to manipulate data columns before plotting. Expressions may be as simple as the designation of a column to be plotted or may contain arithmetic expressions and functions. In the latter case the espression must be enclosed in 'single' or "double" quotation marks. Column numbers are designated by the at-sign character (@). A single expression is used for the Y axis of the plot. OPTIONS
-h, --help Print the usage and exit. --version Print the version number and exit. -w Watch the input file for commands to stripchart, or wait to read all of stdin before plotting. Only one file or - for stdin may be specified with this option. No other options may be used in conjuction with this option. -q Plot the first and second columns of each file. -l Plot with lines. -p Plot with points. EXAMPLES
Plot the second column versus the first of all three files with lines only. plotit -lq file1.dat file2.dat file3.dat Plot the quotient of the third column and the second column versus the first column of all files matching the pattern using points only. plotit -p '@3/@2' file??.dat Plot the natural log of the second column divided by the third column versus the fourth column. By default these data are plotted with both lines and points. plotit @4 'log(@2/@3)' file.dat AUTHOR
This manual page was written by Carlo Segre <segre@iit.edu>. February 21, 2009 plotit(1)
All times are GMT -4. The time now is 07:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy