Sponsored Content
Full Discussion: Newbie question
Top Forums Shell Programming and Scripting Newbie question Post 62700 by peeyush_23 on Friday 18th of February 2005 04:14:19 PM
Old 02-18-2005
Newbie question

Hello,

I have text file while looks this

test1
test2
test3
test4
test5
test6

and if I want to parse it and make new file which would like this

test1 test2
test3 test4
test5 test6

How can I do this in korn shell script

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

newbie question

hi im thinking of getting unix but i have no idea where to start I know that its an OS similar to linux but what hardware does in run on? i've heard of solaris but im not quit sure what it is thankxs (3 Replies)
Discussion started by: ninja
3 Replies

2. UNIX Desktop Questions & Answers

Newbie Question

I am fairly new to *nix/linux and I have just installed SuSe 8.2. I am wondering what skills would be good to learn. I know that I will need to learn how to write scripts, but what scripting languages should I learn. I greatly appreciate any and all comments. ... (5 Replies)
Discussion started by: Ntalektual
5 Replies

3. UNIX for Dummies Questions & Answers

Newbie Question

Hi, I have a file, that is delimited by :: and the purpose of this file is none of your business. ;) There are about 65000 lines in this file, and there are lines that I would like to remove. About 45000 of them. Is there some sort of commands that I can run, to remove word(s) from this... (4 Replies)
Discussion started by: th3gh05t
4 Replies

4. UNIX for Dummies Questions & Answers

Very new newbie question

sorry if im not asking inthe right spot but, how do you turn the beeping off every time you hit a key onthe keyboard. I tried the click -n but it told me it didnt recognize click any help would be greatly appreciated ( the beeping is not going over well in the surrounding cubicles) thank you... (4 Replies)
Discussion started by: Split100
4 Replies

5. UNIX for Dummies Questions & Answers

newbie question

I am taking a db classes toward oracle 10g. I am taking unix as well . I need to know what is the best option for os . should I use linux fedora. or get a sun box and start learning from there. Thanks (6 Replies)
Discussion started by: xzyan
6 Replies

6. UNIX for Dummies Questions & Answers

Newbie question?

What is the best way to learn UNIX on the web, with out buying books? any link would be much help. Thank you in advance, L (1 Reply)
Discussion started by: lsoria1
1 Replies

7. Programming

Newbie question

Dear all, I have a question related to parallel programing and if you can give me some hints on how to deal with it, it would be really great. I would like to run a small application on a supercompter of 128 CPUs. Unfortunately, on this machine only jobs which require 32 CPUs are allowed to... (1 Reply)
Discussion started by: Eduard
1 Replies

8. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

9. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

10. UNIX for Dummies Questions & Answers

newbie question

Hi all, I am sure this is very simple but I cant quite get it. I am trying to search textfile1.txt for a string then take the results of the search and append the result to textfile3.txt So far I have used $ find file1.txt -exec grep "string i am looking for" '{}' \; -print this... (2 Replies)
Discussion started by: radgator
2 Replies
Devel::Backtrace(3pm)					User Contributed Perl Documentation				     Devel::Backtrace(3pm)

NAME
Devel::Backtrace - Object-oriented backtrace VERSION
This is version 0.12. SYNOPSIS
my $backtrace = Devel::Backtrace->new; print $backtrace; # use automatic stringification # See EXAMPLES to see what the output might look like print $backtrace->point(0)->line; METHODS
Devel::Backtrace->new() Optional parameters: -start => $start, -format => $format If only one parameter is given, it will be used as $start. Constructs a new "Devel::Backtrace" which is filled with all the information "caller($i)" provides, where $i starts from $start. If no argument is given, $start defaults to 0. If $start is 1 (or higher), the backtrace won't contain the information that (and where) Devel::Backtrace::new() was called. $backtrace->point($i) Returns the i'th tracepoint as a Devel::Backtrace::Point object (see its documentation for how to access every bit of information). Note that the following code snippet will print the information of "caller($start+$i)": print Devel::Backtrace->new($start)->point($i) $backtrace->points() Returns a list of all tracepoints. In scalar context, the number of tracepoints is returned. $backtrace->skipme([$package]) This method deletes all leading tracepoints that contain information about calls within $package. Afterwards the $backtrace will look as though it had been created with a higher value of $start. If the optional parameter $package is not given, it defaults to the calling package. The effect is similar to what the Carp module does. This module ships with an example "skipme.pl" that demonstrates how to use this method. See also "EXAMPLES". $backtrace->skipmysubs([$package]) This method is like "skipme" except that it deletes calls to the package rather than calls from the package. Before discarding those calls, "skipme" is called. This is because usually the topmost call in the stack is to Devel::Backtrace->new, which would not be catched by "skipmysubs" otherwise. This means that skipmysubs usually deletes more lines than skipme would. "skipmysubs" was added in Devel::Backtrace version 0.06. See also "EXAMPLES" and the example "skipme.pl". $backtrace->to_string() Returns a string that contains one line for each tracepoint. It will contain the information from "Devel::Backtrace::Point"'s to_string() method. To get more information, use the to_long_string() method. Note that you don't have to call to_string() if you print a "Devel::Backtrace" object or otherwise treat it as a string, as the stringification operator is overloaded. See "EXAMPLES". $backtrace->to_long_string() Returns a very long string that contains several lines for each trace point. The result will contain every available bit of information. See "to_long_string" in Devel::Backtrace::Point for an example of what the result looks like. EXAMPLES
A sample stringification might look like this: Devel::Backtrace::new called from MyPackage (foo.pl:30) MyPackage::test2 called from MyPackage (foo.pl:28) MyPackage::test1 called from main (foo.pl:18) main::bar called from main (foo.pl:6) main::foo called from main (foo.pl:13) If MyPackage called skipme, the first two lines would be removed. If it called skipmysubs, the first three lines would be removed. If you don't like the format, you can change it: my $backtrace = Devel::Backtrace->new(-format => '%I. %s'); This would produce a stringification of the following form: 0. Devel::Backtrace::new 1. MyPackage::test2 2. MyPackage::test1 3. main::bar 4. main::foo SEE ALSO
Devel::StackTrace does mostly the same as this module. I'm afraid I hadn't noticed it until I uploaded this module. Carp::Trace is a simpler module which gives you a backtrace in string form. Devel::DollarAt comes with this distribution and is a nice application of this module. You can use it for debugging to get a backtrace out of $@. AUTHOR
Christoph Bussenius <pepe@cpan.org> If you use this module, I'll be glad if you drop me a note. You should mention this module's name in the subject of your mails, in order to make sure they won't get lost in all the spam. LICENSE
This module is in the public domain. If your country's law does not allow this module being in the public domain or does not include the concept of public domain, you may use the module under the same terms as perl itself. perl v5.10.0 2009-01-27 Devel::Backtrace(3pm)
All times are GMT -4. The time now is 05:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy