9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I want to extract rows with the pattern ALPHANUMERIC/ALPHANUMNERIC in the 2nd column.
I dont wan rows with more than 1 slash or without any slash in 2nd column.
a a/b
b a/b/c
c a/b//c
d t/y
e r
f /f
I came up with the regex
grep '\/$' file
a a/b
b a/b/c
d t/y (3 Replies)
Discussion started by: jianp83
3 Replies
2. Shell Programming and Scripting
Have Pipe Delimited File:
> BRYAN BAKER|4/4/2015|518 VIRGINIA AVE|TEST
> JOE BAXTER|3/30/2015|2233 MockingBird RD|ROW2On 3rd column where the address is located, I want to add a space after every numeric value - basically doing a "s//&\ / ":
> BRYAN BAKER|4/4/2015|5 1 8 VIRGINIA AVE|TEST
> JOE... (5 Replies)
Discussion started by: svn
5 Replies
3. Shell Programming and Scripting
Hi to you all,
I'm just struggling with a regex problem and I'm pretty sure that I'm missing sth obvious... :confused:
I need a regex to feed my grep in order to find lines that contain one string but not the other.
Here's the data example:
2015-04-08 19:04:55,926|xxxxxxxxxx| ... (11 Replies)
Discussion started by: stresing
11 Replies
4. Shell Programming and Scripting
Hi,
I have pipe separated file which contains some data having comma(,) in it. I want to remove the comma(,) only from particular column without changing data in other columns.
Below is the sample data file, I want to remove the comma(,) only from 5th column.
$ cat file1
ABC | DEF, HIJ|... (6 Replies)
Discussion started by: Prathmesh
6 Replies
5. Shell Programming and Scripting
Hello,
I am working on an Urdu to Hindi dictionary which has the following structure:
a=b
a=c
n=d
n=q
and so on.
i.e. Headword separated from gloss by a =
I am giving below a live sample
بتا=बता
بتا=बित्ता
بتا=बुत्ता
بتان=बतान
بتان=बितान
بتانا=बिताना
I need the following... (3 Replies)
Discussion started by: gimley
3 Replies
6. Shell Programming and Scripting
My input contains a single word lines.
From each line
data.txt
prjtestBlaBlatestBlaBla
prjthisBlaBlathisBlaBla
prjthatBlaBladpthatBlaBla
prjgoodBlaBladpgoodBlaBla
prjgood1BlaBla123dpgood1BlaBla123
Desired output -->
data_out.txt
prjtestBlaBla
prjthisBlaBla... (8 Replies)
Discussion started by: kchinnam
8 Replies
7. Shell Programming and Scripting
I am attempting to convert rewrite rules to Nginx, and since due to the mass amount of rewrites we must convert, I've been trying to write a script to help me on a specific part, easily.
So far I have this:
rewrite ^action/static/(+)/$ staticPage.php?pg=$1&%$query_string;
What I want done... (5 Replies)
Discussion started by: EXT3FSCK
5 Replies
8. UNIX for Dummies Questions & Answers
Hi all, this is driving me nuts.
I need to evaluate if a variable in a shell script has a heading s or m character e.g. s92342394 or m9233489 if so then I need to get rid of them. I'm quite familiar with PERL and could do it there in 3 mins but I have not found a decent way to do this in a shell.... (1 Reply)
Discussion started by: Endo
1 Replies
9. Shell Programming and Scripting
Hi,
I remember once seeing a way to get the left most string in a word.
Let's say: a="First.Second.Third" (separated by dot)
echo ${a#*.} shows --> Second.Third
echo ${a##*.} shows --> Third
How do I get the the left most string "First" Or "First.Second" ???
Tried to replace #... (2 Replies)
Discussion started by: jfortes
2 Replies
m17n-dump(1) The m17n Library m17n-dump(1)
NAME
m17n-dump - dump text image
SYNOPSIS
m17n-dump [ OPTION ... ] [ FILE ]
DESCRIPTION
Dump a text as PNG image file.
The PNG file is written to a file created in the current directory with the name 'BASE.png' where BASE is the basename of FILE. If FILE is
omitted, text is read from standard input, and the image is dumped into the file 'output.png'.
The following OPTIONs are available.
o -s SIZE
SIZE is the font size in point. The default font size is 12 point.
o -d DPI
DPI is the resolution in dots per inch. The default resolution is 300 dpi.
o -p PAPER
PAPER is the paper size: a4, a4r, a5, a5r, b5, b5r, letter, WxH, or W. In the case of WxH, W and H are the width and height in millimeter.
In the case of W, W is the width in millimeter. If this option is specified, PAPER limits the image size. If FILE is too large for a single
page, multiple files with the names 'BASE.01.png', 'BASE.02.png', etc. are created.
o -m MARGIN
MARGIN is the horizontal and vertical margin in millimeter. The default margin is 20 mm. It is ignored when PAPER is not specified.
o -c POS
POS is the character position of cursor to draw. By default, cursor is not drawn.
o -x
FILE is assumed to be an XML file generated by the serialize facility of the m17n library, and FILE is deserialized before an image is
created.
o -w
Each line is broken at word boundary.
o -f FILTER
FILTER is a string containing a shell command line. If this option is specified, the PNG image is not written info a file but is given to
FILTER as standard input. If FILTER contains '%s', that part is replaced by a basename of FILE. So, the default behaviour is the same as
specifying 'cat >
%s.png' as FILTER.
If FILTER is just '-', the PNG image is written to stdout.
o -a
Enable anti-alias drawing.
o --family FAMILY
Prefer a font whose family name is FAMILY.
o --language LANG
Prefer a font specified for the language LANG. LANG must be a 2-letter code of ISO 630 (e.g. 'en' for English).
o -fg FOREGROUND
Specify the text color. The supported color names are those of HTML 4.0 and '#RRGGBB' notation.
o -bg BACKGROUND
Specify the background color. The supported color names are the same as FOREGROUND, except that if 'transparent' is specified, make the
background transparent.
o -r
Specify that the orientation of the text is right-to-left.
o -q
Quiet mode. Don't print any messages.
o --version
Print the version number.
o -h, --help
Print this message.
COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License
<http://www.gnu.org/licenses/fdl.html>.
Version 1.6.2 12 Jan 2011 m17n-dump(1)