hi all, I have read similiar topics in this board, but i didn' t find the posting which is the same with the problem i face.. I try to extract string from the end. i try to do this:
num=abcdefghij
num2=${num:-5}
echo $num2 #this should print the last 5 characters (fghij)
but it doesn;t... (3 Replies)
hi
i need to name a file with a substring of a another file name.
i.e. if the old filename is abc.txt , the new filename should be abc_1.txt
i should get the substring of the file name and then name the new one
please let me know how to do it (4 Replies)
Hi awk and sed gurus,
Please help me in the following.
I have the following entries in the file
ABCDErules
AbHDPrules
ABCrules
--
--
and other entries in the file.
Now, I want to extract from the file that contain entries for *rules and process it separately.
How can i do it... (6 Replies)
Hi,
I would like to extract a substring from a string in unix.
eg:
./checkfile.sh -- i need only checkfile.sh from this string.
Could someone help me out in this...
Regards
Arun (19 Replies)
Hi,
I have string in variable like '/u/dolfin/in/DOLFIN.PRL_100.OIB.TLU.001.D20110520.T040010'
and i want to conevrt this string into only "DOLFIN.PRL_100.OIB.TLU.001.D20110520.T040010" (i.e file name).
Is there any command to extracting string in some part ?(rather than whole path)?
... (5 Replies)
Hi all,
I need to extract the "abcdef" from the below string Digital_abcdef_20130103.txt.gz
The length of the "abcdef" will be changing but it will be always after the word Digital_ and before the second underscore
help in this regard is highly appreciated (3 Replies)
Hi,
I am new to Unix. I am trying to extract a substring from an input string: Ex -
input string: deploy_v11_9_1
i want to extract and store the value v11_9_1 from the input string in a new variable.
I am using following command in my shell script file:
echo "Enter the folder name u... (5 Replies)
Hi All
I have a line which is as below
1234567 Gagan Paswani zz23432 1000000000 1000000000 ASTHEYXX-RTUC zz23432
I need to extract the first occurence of zz23432 which will have the reg expression as
{2}{5}
Could you please assist as to how I can extract this... (3 Replies)
Hi All,
I'm facing issue wherein I have 2 character string like 'CR' and 'DR' and I want to extract just 1st character but am unable to do it. I tried below options but they are returning me 2nd character only,
var="CR"
echo ${var:1}
returns just "R"
echo ${var:0}
returns "CR"
... (5 Replies)
Discussion started by: arvindshukla81
5 Replies
LEARN ABOUT REDHAT
unwrapdiff
UNWRAPDIFF(1)UNWRAPDIFF(1)NAME
unwrapdiff - demangle word-wrapped patches
SYNOPSIS
unwrapdiff [-v] [file...]
unwrapdiff {--help | --version}
DESCRIPTION
unwrapdiff demangles patches that have been word-wrapped, in an attempt to make them useful.
The corrected diff is sent to standard output. Note that you will probably need to use the -l option when applying the patch, in order to
ignore any whitespace differences there may be.
OPTIONS -v Verbose operation. A list of lines that are modified in a way that might be wrong is sent to stderr.
--help Display a short usage message.
--version
Display the version number of unwrapdiff.
LIMITATIONS
Some heuristics are used to decide whether use a space to recombine a wrapped line, or just join them together. Currently this is done by
comparing with last three characters of a line with the first two characters of its continuation, and using a space of any of them are dif-
ferent.
The patch needs to have been valid before being word-wrapped.
The last line of a hunk is nearly always ambiguous. If the next line begins ``@@'', ``Index:'', ``diff'' or ``---'' then it is taken to be
complete; otherwise it is unwrapped using the next line.
AUTHOR
Tim Waugh <twaugh@redhat.com>.
patchutils 17 January 2003 UNWRAPDIFF(1)