Ok, I'm stumped and can't seem to find relevant info.
(I'm not even sure, I might have asked something similar before.):
I'm trying to use shell scripting/UNIX commands to extract URLs from a fairly large web page, with a view to ultimately wrapping this in PHP with exec() and including the... (2 Replies)
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
so i have hundreds of files named history.20071112.tar
(history.YYYYMMDD.tar)
and im looking to extract one file out of each archive called status_YYYYMMDDHH:MM.lis
here is what i have so far:
for FILE in `cat dirlist`
do
tar xvf $FILE ./status_*
done
dirlist is a text... (4 Replies)
Input file is on Linux box and the input file has data in just one line with 1699741696 characters.
Sample Input:
<xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi all,
Given a file name such as
EXAMPLE=lastname-02.30.71-firstname-town-other.tar.gz
How do I print everything before the first dash (i.e. lastname)
Note: I do not know exactly how many dashes or what information there will be in each file name so it is important that the code... (2 Replies)
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Hello. I am sorry if this is a common question but through all my searching, I haven't found an answer which matches what I want to do.
I am looking for a sed command that will parse through a large text file and extract lines that start with specific words (which are repeated throughout the... (4 Replies)
Discussion started by: MrDumbQuestion
4 Replies
LEARN ABOUT OPENDARWIN
vis
VIS(1) BSD General Commands Manual VIS(1)NAME
vis -- display non-printable characters in a visual format
SYNOPSIS
vis [-cbflnostw] [-F foldwidth] [file ...]
DESCRIPTION
The vis utility is a filter for converting non-printable characters into a visual representation. It differs from 'cat -v' in that the form
is unique and invertible. By default, all non-graphic characters except space, tab, and newline are encoded. A detailed description of the
various visual formats is given in vis(3).
The options are as follows:
-b Turns off prepending of backslash before up-arrow control sequences and meta characters, and disables the doubling of backslashes.
This produces output which is neither invertible or precise, but does represent a minimum of change to the input. It is similar to
``cat -v''.
-c Request a format which displays a small subset of the non-printable characters using C-style backslash sequences.
-F Causes vis to fold output lines to foldwidth columns (default 80), like fold(1), except that a hidden newline sequence is used,
(which is removed when inverting the file back to its original form with unvis(1)). If the last character in the encoded file does
not end in a newline, a hidden newline sequence is appended to the output. This makes the output usable with various editors and
other utilities which typically don't work with partial lines.
-f Same as -F.
-l Mark newlines with the visible sequence '$', followed by the newline.
-n Turns off any encoding, except for the fact that backslashes are still doubled and hidden newline sequences inserted if -f or -F is
selected. When combined with the -f flag, vis becomes like an invertible version of the fold(1) utility. That is, the output can be
unfolded by running the output through unvis(1).
-o Request a format which displays non-printable characters as an octal number, ddd.
-s Only characters considered unsafe to send to a terminal are encoded. This flag allows backspace, bell, and carriage return in addi-
tion to the default space, tab and newline.
-t Tabs are also encoded.
-w White space (space-tab-newline) is also encoded.
SEE ALSO unvis(1), vis(3)HISTORY
The vis command appeared in 4.4BSD.
BSD April 19, 1994 BSD