The definition of how file decides on filetype is:
Code:
The type printed will usually contain one of the words text (the file
contains only printing characters and a few common control characters and
is probably safe to read on an ASCII terminal), executable (the file con‐
tains the result of compiling a program in a form understandable to some
UNIX kernel or another), or data meaning anything else (data is usually
‘binary' or non-printable). Exceptions are well-known file formats (core
files, tar archives) that are known to contain binary data.
from man file, q.v.
One could create one's own file command and add the GS control character as an exception -- I have not done it, but I think the file magic could be so changed. Otherwise, one could replace the GS (say with sed) to something innocuous before feeding the resulting copy of the data file to the file commend.
Hi All
I am simulating a problem in the production where i faced a situation.
Please find the following example program which i simulated.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char str1; (3 Replies)
i have no idea abount shell script but i need need shell script to get last 10 char from a file name and write in to a new file.
consider u hav 5 files in a particular dir i script should get last 10 char of each file n write the 10 char in separate files (2 Replies)
I've this file and need to sort the data in each group
File would look like this ...
cat file1.txt
Reason : ABC
12345-0023
32123-5400
32442-5333
Reason : DEF
42523-3453
23345-3311
Reason : HIJ
454553-0001
I would like to sort each group on the last 4 fileds and print them... (11 Replies)
Hi all,
I'm reading a file with this layout:
First_Col Second_Col
The Second_Col has values as 1000, -1, 10, 43...
While reading the file I'm getting the second column value with awk command, but it is including the CR control char.
do
item_saved=`echo $b | awk '{print... (4 Replies)
hi
I have the below code to convert hexa to binary. It is working fine, but i want to store the binary in char or int. The below program is printing the result.
void ConvertHexToBinary(char sHexValue)
{
int i;
printf("Binary Equivalent=");
for(i=0;sHexValue!=NULL;i++)
{
... (1 Reply)
Hi
I am using sed command to make SCORE=somevalue to SCORE=blank in a file.
Please see the attached lastline.txt file. After executing the below command on the file, it removes the last line.
cat lastline.txt | sed 's/SCORE=.*$/SCORE=/g' > newfile.txt
Why does sed command remove the... (3 Replies)
I am trying to add a unique identifier to two file extensions .bam and .vcf in a directory located at /home/cmccabe/Desktop/index/R_2016_09_21_14_01_15_user_S5-00580-9-Medexome.
The identifier is in $2 of the input file. What the code below is attempting to do is strip off the last portion... (21 Replies)
Unix File is pipe delimited with 17 fields. We may get extra pipes in data also.
We may get \n char (1 or more \n in one field or multi fileds) in data in any field.
Need to replace \n true ( line separator) with 'space and bell char space' chars (' \a ') Not data \n.
Input:... (1 Reply)
Discussion started by: rajeshkumare
1 Replies
LEARN ABOUT DEBIAN
file::changenotify::configdata
File::ChangeNotify::ConfigData(3pm) User Contributed Perl Documentation File::ChangeNotify::ConfigData(3pm)NAME
File::ChangeNotify::ConfigData - Configuration for File::ChangeNotify
SYNOPSIS
use File::ChangeNotify::ConfigData;
$value = File::ChangeNotify::ConfigData->config('foo');
$value = File::ChangeNotify::ConfigData->feature('bar');
@names = File::ChangeNotify::ConfigData->config_names;
@names = File::ChangeNotify::ConfigData->feature_names;
File::ChangeNotify::ConfigData->set_config(foo => $new_value);
File::ChangeNotify::ConfigData->set_feature(bar => $new_value);
File::ChangeNotify::ConfigData->write; # Save changes
DESCRIPTION
This module holds the configuration data for the "File::ChangeNotify" module. It also provides a programmatic interface for getting or
setting that configuration data. Note that in order to actually make changes, you'll have to have write access to the
"File::ChangeNotify::ConfigData" module, and you should attempt to understand the repercussions of your actions.
METHODS
config($name)
Given a string argument, returns the value of the configuration item by that name, or "undef" if no such item exists.
feature($name)
Given a string argument, returns the value of the feature by that name, or "undef" if no such feature exists.
set_config($name, $value)
Sets the configuration item with the given name to the given value. The value may be any Perl scalar that will serialize correctly
using "Data::Dumper". This includes references, objects (usually), and complex data structures. It probably does not include
transient things like filehandles or sockets.
set_feature($name, $value)
Sets the feature with the given name to the given boolean value. The value will be converted to 0 or 1 automatically.
config_names()
Returns a list of all the names of config items currently defined in "File::ChangeNotify::ConfigData", or in scalar context the number
of items.
feature_names()
Returns a list of all the names of features currently defined in "File::ChangeNotify::ConfigData", or in scalar context the number of
features.
auto_feature_names()
Returns a list of all the names of features whose availability is dynamically determined, or in scalar context the number of such
features. Does not include such features that have later been set to a fixed value.
write()
Commits any changes from "set_config()" and "set_feature()" to disk. Requires write access to the "File::ChangeNotify::ConfigData"
module.
AUTHOR
"File::ChangeNotify::ConfigData" was automatically created using "Module::Build". "Module::Build" was written by Ken Williams, but he
holds no authorship claim or copyright claim to the contents of "File::ChangeNotify::ConfigData".
perl v5.14.2 2012-04-14 File::ChangeNotify::ConfigData(3pm)