Halo,
Bash Script can get the time of process the trasaction or not?
For example, bash script use to procee the trasaction, like select and checking.. then generate the XML. after it, i need to get the time which to count the process.
Anyone can help me?
Thank you (1 Reply)
Hi,
I need add leading zeroes to a field in a file based on the character count. The field can be of 1 character to 6 character length. I need to make the field 14bytes.
eg:
8351,20,1
8351,234,6
8351,2,0
8351,1234,2
8351,123456,1
8351,12345,2
This should become.
... (3 Replies)
consider this as a csv file.
H,0002,0002,20100218,17.25,P,barani
D,1,2,3,4,5,6,7,8,9,10,11
D,1,2,3,4,5,6,7,8,9,10,11
D,1,2,3,4,5,6,7,8,9,10,11
D,1,2,3,4,5,6,7,8,9,10,11
D,1,2,3,4,5,6,7,8,9,10,11
T,5
N
i want to read the csv file and count the number of rows that start with D and... (11 Replies)
hi,
I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this
the input text file will contain data in the format:
job name para1 para2 para3 para4 para4
1 ... (1 Reply)
Hi I need a bash script that can search through a text file and when it finds 'FSS1206' I need to put a Letter F 100 spaces after the second instance of FSS1206
The format is the same throughout the file I need to repeat this on every time it finds the second 'FSS1206' in the file
I have... (0 Replies)
HI All,
I have a script in bash that i want that script will perform action
When the size of a particular folder exceeds the 80%.
Here is an example of script that result is exactly 80% :
#!/bin/bash
CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5)
if ];... (1 Reply)
Hi,
I have a requirement where in I need to insert delimiters before the last column of the total delimiters is less than a specified number.
Say if the delimiters is less than 139, I need to insert 2 columns ( with blanks) before the last field
awk -F 'Ç' '{ if (NF-1 < 139)} END { "Insert 2... (5 Replies)
The input file is a .dat file which is delimited by null (^@ in Linux). On a windows PC it looks something like this (numbers are masked with 1).
https://i.imgur.com/nta2Gqp.jpg
The entire file is in one row but it has multiple records - each record contains 80 fields i.e. there are 81 counts... (9 Replies)
Hi, I'm looking to accomplish the following.
Insert current date into three places/cells within a cvs, every time the bash script is executed.
The cells are column A,B,C row 2. Row 1 is reserved for the headers.
The file name is always orders.csv. These three cells we always have an old... (1 Reply)
Team
I have files in different directories . How can i take the count of latest file and insert into Db2 table .
I am using
awk 'END{print NR+1-ARGC}' (File name)
to get the counts.
How can i take
1.The count of latest file
2.Insert into Db2 table( File Name and Counts) .
cd... (4 Replies)
Discussion started by: Perlbaby
4 Replies
LEARN ABOUT LINUX
bytes
bytes(3pm) Perl Programmers Reference Guide bytes(3pm)NAME
bytes - Perl pragma to force byte semantics rather than character semantics
NOTICE
This pragma reflects early attempts to incorporate Unicode into perl and has since been superseded. It breaks encapsulation (i.e. it
exposes the innards of how the perl executable currently happens to store a string), and use of this module for anything other than
debugging purposes is strongly discouraged. If you feel that the functions here within might be useful for your application, this possibly
indicates a mismatch between your mental model of Perl Unicode and the current reality. In that case, you may wish to read some of the perl
Unicode documentation: perluniintro, perlunitut, perlunifaq and perlunicode.
SYNOPSIS
use bytes;
... chr(...); # or bytes::chr
... index(...); # or bytes::index
... length(...); # or bytes::length
... ord(...); # or bytes::ord
... rindex(...); # or bytes::rindex
... substr(...); # or bytes::substr
no bytes;
DESCRIPTION
The "use bytes" pragma disables character semantics for the rest of the lexical scope in which it appears. "no bytes" can be used to
reverse the effect of "use bytes" within the current lexical scope.
Perl normally assumes character semantics in the presence of character data (i.e. data that has come from a source that has been marked as
being of a particular character encoding). When "use bytes" is in effect, the encoding is temporarily ignored, and each string is treated
as a series of bytes.
As an example, when Perl sees "$x = chr(400)", it encodes the character in UTF-8 and stores it in $x. Then it is marked as character data,
so, for instance, "length $x" returns 1. However, in the scope of the "bytes" pragma, $x is treated as a series of bytes - the bytes that
make up the UTF8 encoding - and "length $x" returns 2:
$x = chr(400);
print "Length is ", length $x, "
"; # "Length is 1"
printf "Contents are %vd
", $x; # "Contents are 400"
{
use bytes; # or "require bytes; bytes::length()"
print "Length is ", length $x, "
"; # "Length is 2"
printf "Contents are %vd
", $x; # "Contents are 198.144"
}
chr(), ord(), substr(), index() and rindex() behave similarly.
For more on the implications and differences between character semantics and byte semantics, see perluniintro and perlunicode.
LIMITATIONS
bytes::substr() does not work as an lvalue().
SEE ALSO
perluniintro, perlunicode, utf8
perl v5.12.1 2010-04-26 bytes(3pm)