I'm trying to find a command that will trim the white space off a string.
e.g.
$str = " stuf "
$str = trim ( $str )
echo $str // ouput would just be stuf
Thanks, Mark (4 Replies)
I would like to know how to trim leading zero only in certain column of of a string, example:
hdhshdhdhd000012mmmm0002abc <===== before
hdhshdhdhd 12mmmm 2abc <===== after
Thanks for your help. (2 Replies)
Hello,
I am passing a filename to a script to draw parameters from it. However, I want to use part of the filename as a parameter. The filename is transfer_ccf_3731_10.sh but I only need the 3731_10 part of it.
Is this possible? Any help or suggestions would be appreciated!
Regards,
J. (4 Replies)
Hey Everybody,
I am having much trouble figuring this out, as I am not really a programmer..:mad:
Datafile.txt
Column0 Column1 Column2
ABC DEF xxxGHI
I am running using WGET on a cronjob to grab a datafile, but I need to cut the first three characters from... (6 Replies)
I am coding a C program to read a plain text file. There are a lot of blank fields or a string with white spaces. I want to know is there such a function called trim() in C to clean the white space around a string? Or some other way can do this efficiently? Thanks. (18 Replies)
To trim 3rd field in for all the lines of a file and replace the modified string in that particular field.
For example i have a file called Temp.txt having content
Temp.txt
-----------------
100,234,M1234
400,234,K1734
300,345,T3456
----------------
So the modified file output should... (4 Replies)
I am reading a string like $/folder1/folder2/filename from a file
And I am storing it in a variable say $path.
I want to store the path within single quotes in order to use the path within a command.
if i set like path="'"$path"'"
echo $path
It is printing like ' $/folder1/folder2/filename'... (6 Replies)
HI,
I have a string "NZ-deploy-mode-1.15-Linux.x86_64.rpm"
I want to get the string before -1 ie "NZ-deploy-mode"
Input is "NZ-deploy-mode-1.15-Linux.x86_64.rpm"
expected output is "NZ-deploy-mode"
How can I do that in shell script?
Thanks in advance. (6 Replies)
i am passing below inputfils using while loop and ouput should be trim as below
INPUT:
src_SPS_d_Comment_Tran_File_20130417_001.dat
src_SPS_d_Corp_Adv_Tran_File_20130417_001.dat
src_SPS_d_Letter_Tran_File_20130417_001.dat
src_SPS_d_Loan_Level_File_20130417_001.dat... (8 Replies)
Discussion started by: katakamvivek
8 Replies
LEARN ABOUT DEBIAN
plbin
PLBIN(3plplot) PLplot API PLBIN(3plplot)NAME
plbin - Plot a histogram from binned data
SYNOPSIS
plbin(nbin, x, y, opt)
DESCRIPTION
Plots a histogram consisting of nbin bins. The value associated with the i'th bin is placed in x[i], and the number of points in the bin
is placed in y[i]. For proper operation, the values in x[i] must form a strictly increasing sequence. By default, x[i] is the left-hand
edge of the i'th bin. If opt=PL_BIN_CENTRED is used, the bin boundaries are placed midway between the values in the x array. Also see
plhist(3plplot) for drawing histograms from unbinned data.
Redacted form: General: plbin(x, y, opt) Perl/PDL: plbin(nbin, x, y, opt) Python: plbin(nbin, x, y, opt)
This function is not used in any examples.
ARGUMENTS
nbin (PLINT, input)
Number of bins (i.e., number of values in x and y arrays.)
x (PLFLT *, input)
Pointer to array containing values associated with bins. These must form a strictly increasing sequence.
y (PLFLT *, input)
Pointer to array containing number of points in bin. This is a PLFLT (instead of PLINT) array so as to allow histograms of proba-
bilities, etc.
opt (PLINT, input)
Is a combination of several flags: opt=PL_BIN_DEFAULT: The x represent the lower bin boundaries, the outer bins are expanded to fill
up the entire x-axis and bins of zero height are simply drawn. opt=PL_BIN_CENTRED|...: The bin boundaries are to be midway between
the x values. If the values in x are equally spaced, the values are the center values of the bins. opt=PL_BIN_NOEXPAND|...: The
outer bins are drawn with equal size as the ones inside. opt=PL_BIN_NOEMPTY|...: Bins with zero height are not drawn (there is a
gap for such bins).
AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the
PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere.
SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources.
August, 2012 PLBIN(3plplot)