10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
2. UNIX for Dummies Questions & Answers
Hello,
This would be very basic question to most of you, but for me as a newbie it is an un-know.
I would like to load a configuration file into memory before executing a specific command. For example: I have a config file that holds all the database connectivity information and I'd like to... (5 Replies)
Discussion started by: babyPen1985
5 Replies
3. Shell Programming and Scripting
Greetings!
Looking to clear up a rather simple matter which seems to nonetheless elude me: How does one call Perl's s2p from the commandline? I've tried such as this:perl -e s2p '-i 's/first/last/g' ./somefile.txt'...to convert a similarly-formed GNU sedline over to the Perl equivalent (without... (2 Replies)
Discussion started by: LinQ
2 Replies
4. Shell Programming and Scripting
Hi All,
I find the below code printing the output of a particular field in same line, which i want it to be printed on a new line.
---CODE START---
foreach $defectRec (@outLs) {
my($def_id,$status,$files_mod) = split(/,/, $defectRec);
print "DEFECT ID: $def_id, Status:... (3 Replies)
Discussion started by: nmattam
3 Replies
5. Shell Programming and Scripting
Hi all,
I want to search for a line in a file using perl script and add a line above that line.Can any one suggest me command or code to that using script.
Thanks BHarath (5 Replies)
Discussion started by: bharathece
5 Replies
6. Shell Programming and Scripting
I have a file that contains this.
<NAME>/bob</NAME>
I'm trying to print just the /bob part to my screen. I have a command line example I really think should work. Keep in mind that the content between the <NAME> </NAME> is always changing.
$/tmp> perl -ne 'print /<NAME>($.)<\/NAME>/'... (2 Replies)
Discussion started by: x96riley3
2 Replies
7. Shell Programming and Scripting
hi all
need a perl script to add a line into a file
thanks with anticipation (2 Replies)
Discussion started by: karthikn7974
2 Replies
8. Shell Programming and Scripting
Hey guys,
I have a text file full of data and all I want to do with the thing is add the file extension name to the first line of the file. Here is what I have so far. I can't remember how to append to the first line of the file without deleting the exsisting data.
#!/usr/local/bin/perl
... (5 Replies)
Discussion started by: kingdbag
5 Replies
9. Shell Programming and Scripting
Hi,
Is there a way to determine if a Script is called from a
CRON job or from a commandline
Gerry. (2 Replies)
Discussion started by: jerryMcguire
2 Replies
10. UNIX for Dummies Questions & Answers
im kind alost. i beleave its a sed command. but i cant seem to find it in my book. can someone point me in the write direction.
i know this is extreamly sloppy. but this is what i did untill i can figure out how to manipulate the filename namespace.
an ls on the directory where this would run... (2 Replies)
Discussion started by: Optimus_P
2 Replies