I'm extremely new to scripting and linux in general, so please bear with me. The class I'm taking gives virtually no instruction at all, and so I'm trying to learn everything off the web.
Anyway, I'm trying to extract characters that follow after a specific pattern ( '<B><FONT FACE="Arial">' ) but... (3 Replies)
I have a requirement where i have to read from a .sh file a text lying bet characters like 'SELECT' & ';'...Please help me out in this. I am new to shell scripting. (2 Replies)
Hi All,
i am trying to remove all special charecters().,/\~!@#%^$*&^_- and others from a tab delimited file.
I am using the following code.
while read LINE
do
echo $LINE | tr -d '=;:`"<>,./?!@#$%^&(){}'|tr -d "-"|tr -d "'" | tr -d "_"
done < trial.txt > output.txt
Problem
... (10 Replies)
I have a text file that looks like this:
I want to delete the last character of first column in all rows so that my output looks like this:
Thanks a lot! (1 Reply)
Can I just say, this is such a frustrating and yet enormously rewarding field of study. I'm in the middle of configuring GeekTool (Uh oh, stupid n00b) and I really only have one question.
I'm using Automator to grab a RSS feed, having GeekTool continually run that application every 10 minutes,... (7 Replies)
When I use vi to see what's in the file I get this:
int add1(int x) {^M return x + 1;^M}
^Mint subtract1(int x) {^M return x - 1;^M}
^Mint double_it(int x) {^M return x * 2;^M}
^Mint halve_it(int x) {^Mreturn x / 2;^M}
^Mint main() {^M int myint;^M int result;^M ... (2 Replies)
Hi,
I have a text file which when I do a 'cat' on it looks like below with the OK’s showing in green and any FAIL showing in red.
cat filename output:
===== MySQL Query Check =====
DB mpuser is alive. 733 = Expected 733 Tables. OK ]
DB mpuser_wf is alive. 61 =... (6 Replies)
Version Info:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
$
$ uname -a
Linux stryker138 2.6.18-308.13.1.el5 #1 SMP Thu Jul 26 05:45:09 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
I redirected manpage of ksh command's output to a text file as shown... (6 Replies)
I am using flatfile, in that flat file we are getting the junk chars
1)I21001f<82>^Me<85>!h49 Service Charge
2) I21001f‚
e...!h49 Service Charge
please tell me how to remove all junk chars in unix scripts. (1 Reply)
Discussion started by: Talari
1 Replies
LEARN ABOUT MOJAVE
text::tabs5.18
Text::Tabs(3pm) Perl Programmers Reference Guide Text::Tabs(3pm)NAME
Text::Tabs - expand and unexpand tabs like unix expand(1) and unexpand(1)SYNOPSIS
use Text::Tabs;
$tabstop = 4; # default = 8
@lines_without_tabs = expand(@lines_with_tabs);
@lines_with_tabs = unexpand(@lines_without_tabs);
DESCRIPTION
Text::Tabs does most of what the unix utilities expand(1) and unexpand(1) do. Given a line with tabs in it, "expand" replaces those tabs
with the appropriate number of spaces. Given a line with or without tabs in it, "unexpand" adds tabs when it can save bytes by doing so,
like the "unexpand -a" command.
Unlike the old unix utilities, this module correctly accounts for any Unicode combining characters (such as diacriticals) that may occur in
each line for both expansion and unexpansion. These are overstrike characters that do not increment the logical position. Make sure you
have the appropriate Unicode settings enabled.
EXPORTS
The following are exported:
expand
unexpand
$tabstop
The $tabstop variable controls how many column positions apart each tabstop is. The default is 8.
Please note that "local($tabstop)" doesn't do the right thing and if you want to use "local" to override $tabstop, you need to use
"local($Text::Tabs::tabstop)".
EXAMPLE
#!perl
# unexpand -a
use Text::Tabs;
while (<>) {
print unexpand $_;
}
Instead of the shell's "expand" comand, use:
perl -MText::Tabs -n -e 'print expand $_'
Instead of the shell's "unexpand -a" command, use:
perl -MText::Tabs -n -e 'print unexpand $_'
SUBVERSION
This module comes in two flavors: one for modern perls (5.10 and above) and one for ancient obsolete perls. The version for modern perls
has support for Unicode. The version for old perls does not. You can tell which version you have installed by looking at
$Text::Tabs::SUBVERSION: it is "old" for obsolete perls and "modern" for current perls.
This man page is for the version for modern perls and so that's probably what you've got.
BUGS
Text::Tabs handles only tabs (" ") and combining characters ("/pM/"). It doesn't count backwards for backspaces (" "), omit other non-
printing control characters ("/pC/"), or otherwise deal with any other zero-, half-, and full-width characters.
LICENSE
Copyright (C) 1996-2002,2005,2006 David Muir Sharnoff. Copyright (C) 2005 Aristotle Pagaltzis Copyright (C) 2012 Google, Inc. This module
may be modified, used, copied, and redistributed at your own risk. Publicly redistributed modified versions must use a different name.
perl v5.18.2 2014-01-06 Text::Tabs(3pm)