write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers:b:.help is appreciated.thank you. (3 Replies)
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
Hi,
I would like to know how to solve one of my problems using expert unix commands.
I have a file with occasional blank lines;
for example;
dertu
frthu
fghtu
frtty
frtgy
frgtui
frgtu
ghrye
frhutp
frjuf
I need to edit the file so that the file looks like this; (10 Replies)
Hi,
I have a file will 1000 lines.... I want to deleted some line in the file... like 800-850 lines i want to remove in that...
can somebody help me..?
thanks. (2 Replies)
hello everyone
my file contains many records, the following is a sample:
BEGIN
ASX1500000050002010120000000308450201012000177
ASX1100002000000201012000000038450201012000220
ASX1600100005000201012000000038450020101200177
ASX1900100006000201067000000058450020101200177... (2 Replies)
I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file
---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
Hi All,
This might be a basic question... I need to write a script to find all/any Speacial/Null/Control Chars and Print Line Numbers from an input file.
Output something like
Null Characters in File Name at : Line Numbers
Line = Print the line
Control Characters in File Name at : Line... (2 Replies)
Hi All,
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 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)