Please suggest a method (in c shell or any other shell) to implement following:
-To read file1.txt (sample file1 given below)
-To save name field in a variable <name>
-To save parameter field in a variable <parameter>
for ex. let a line in file1.txt be :
the extracted results can be checked as: echo "$bill" # prints - bill echo "$height" #prints - height echo "$weight" #prints - weight
sample file1.txt
The idea is to enter the data in file1 as and when requiring and the script automatically extracting even the new line.
I guess it can be possible using "awk", but need HELP!
---------- Post updated at 02:44 PM ---------- Previous update was at 01:38 PM ----------
--- added later-------
or is it possible to do what i have asked in previous post?
please advice
please help for the following task...
I have to extract the mac address & IP address from the file1:
...
0100004512EEF4 03 192.168.0.7 192.168.0.1 -1 ...
0100779hF5D212 03 192.168.0.8 192.168.0.1 -1 ...
0100789lF5D212 03 192.168.0.9 192.168.0.1 -1 ...
...
change the format (addidng... (15 Replies)
Hi Everyone,
I have a file with the below content:
File1.txt
======
###
###==> the below table was created for testing1 purpose;
###
create table 123
(
field1 date,
field2 char(10)
primary key(field1)
);
###
###==> the below table was created... (5 Replies)
By using a csh, I want to address a variable content whose name is/matches the content of a given other variable.
i.e.
set name=´sam´
set ${name}_age=´27´
So, by typing: echo ${name}_age
I correctly obtain: sam_age
By typing: echo $sam_age
or echo ${sam_age}
I correctly obtain: 27
... (1 Reply)
I'm using Mail::Internet module, which will basically filter through email content and extract the body of the message
my perl script to extract the body of the email
#!/usr/bin/perl -w
use Mail::Internet;
@lines = <STDIN>;
$mi_obj = new Mail::Internet();
... (2 Replies)
I have an input file with contents like:
./prbru6/12030613.LOG:24514|APPL|prbru6.8269.RTUDaemon.1|?|13:49:56|12/03/06|GMT+3|?|RTUServer Error:Count of Internal Error Qty (-1) < 0, for Audit group id - 1L5XVJ6DQE36AXL, after record number,1, File: EventAuditor.cc, Line: 394|? ... (5 Replies)
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)
We have been provided a .dump file.The need is to extract the contents(may includes files and folder).
ls -lZ didnt help me as Z is not a valid option.
How to extract the file contents ? (7 Replies)
I have a variable and assigned the following values
***XYZ_201519_20150929140642_20150929140644_211_0_0_211
I need to read this variable from backward and stop read when I get first underscore (_)
In this scenario I should get 211
Thanks
Kris (3 Replies)
Discussion started by: mkris
3 Replies
LEARN ABOUT DEBIAN
ocamlify
OCAMLIFY(1) General Commands Manual OCAMLIFY(1)NAME
ocamlify - create an OCaml file including other files.
SYNOPSIS
ocamlify [options] option-file
DESCRIPTION
This program allows to copy files inside OCaml code. It uses a first file that describes the other files that must be included and the
type of OCaml variable it should create. It can also describe dependencies to other files, in order to generate .depends files for make.
For example, we can create a file test.mlify with this content:
VarString oasissys_ml "OASISSys.ml"
VarStringList readme_template_mkd "MANUAL-template.mkd"
We then translate it using the program:
$> ocamlify --output test.ml test.mlify
And we get a file test.ml containing two OCaml variables: oasissys_ml, which is a string, and readme_template_mkd which is a string list
(one string per line).
OPTIONS --var-string-list varname file
Include file as a list of string, each string representing a line (without trailing EOL character)
--var-string varname file
Include file as a string.
--output file
Output file, default to standard output
--depends
Output file dependencies
--target file
Define target of dependencies
-help|--help
Display list of options
AUTHORS
Sylvain Le Gall.
Ocamlify User Manual November 9, 2010 OCAMLIFY(1)