Hi,
I have a file called /bb/bin/rstrt.
I need to move the line/entry "ccpm_load_shared_memory" after the entry
"initcorp". The problem is that there are several entries for "initcorp" in this file and I need the entry to be moved only after the first instance of "initcorp"
Is there a way... (5 Replies)
Can somebody help me with a script ....
Read a file /etc/inittab
find the string starting with rcml and move it entirely towards the end of file.
rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1
I basically want to change the startup sequence. (2 Replies)
Hi,
How can i move to particular line and to a particular position in a file using unix commands ?
eg: in the line 30 and position 10 i want to print my name in a file.
Cheers,
Mohan (1 Reply)
I have parsed a curl download with sed commands. I would also like to move the last line in the output file to the top. Can I use sed for this? (3 Replies)
My current output is as follows:
All Day Event
Someone's Birthday
Class 7:00 PM
Pick up dry cleaning 1:00 PM
Wake up 8:00 AM
I'd like the output to remain the same but have the times moved to the beginning of the line with a hyphen after it so it would look like,
All Day Event... (3 Replies)
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
So say I have the file:
john
london
24
male
========
jane
london
22
female
========
mike
23
========
Bob
how do i get the information i need on one line as such: (5 Replies)
I have menu option in my script and in that i have 4 options like below :-
echo "Please select a target server .."
echo " AIX - AIX1"
echo " AIX - AIX2"
echo " AIX - AIX3"
echo " HP-UX - HP-UX1"
echo "Enter your menu choice : \n"
read tgtser
... (8 Replies)
Hi,
I have a following file and it has only one occurrence of line that says "Output view:". It could be in middle somewhere ( i don't know the exact location ). I want to move it as the first line of the file.
Input
AAA
BBBB
CCCC
Output view:
XXXX
YYYY
ZZZZ
Output should be:
Output... (13 Replies)
Discussion started by: jakSun8
13 Replies
LEARN ABOUT MOJAVE
text::tabs
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)