10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I achieve this? Perl would be awesome.
Input string a_b c //Note there is a blank here
Needed Output a_b_c
Thanks (4 Replies)
Discussion started by: dragonpoint
4 Replies
2. Shell Programming and Scripting
I am trying to write a simple perl script to run on a FreeBSD machine.
There are alot of posts here, and I have read so many, yet can not get this script to run.
#!/usr/bin/perl
-e 's/\r\n/~/' infile.txt outfile.txt
I am trying to take a windows text file, move it into Unix, run a script on... (1 Reply)
Discussion started by: mach1
1 Replies
3. Shell Programming and Scripting
I would like to assign the output of printf to a variable in perl , it give me back a "1" instead of the time. How can I stuff the variable with what printf returns?
Here is my code:
#!/usr/bin/perl
$time = localtime(time);... (3 Replies)
Discussion started by: Dabheeruz
3 Replies
4. Shell Programming and Scripting
Hi,
anyone knows the perl search-and-replace expression for
strcpy (char * destination, const char * source ); to
strncpy ( char * destination, const char * source, size_t num ); ?
the first and second arguments are the same (destination and source), the difference being that strncpy... (1 Reply)
Discussion started by: ChaMeN
1 Replies
5. Shell Programming and Scripting
Hello,
In perl lang, I have create a string (@str) by sprintf but unfortunately when program printed it out, only I could saw a number like 1. Certainly printf doesn't problem. How I can convert a string that are result of sprintf to a common string format??!
Thanks in advance.
PLEASE HELP ME. (2 Replies)
Discussion started by: Zaxon
2 Replies
6. UNIX for Dummies Questions & Answers
I am using perl to perform a search and replace. It works at the command line, but not in the csh shell script
perl -pi -e 's@/Pattern@@g' $path/$file
I used the @ as my delimiter because the pattern contains "/" (3 Replies)
Discussion started by: NobluesFDT
3 Replies
7. Shell Programming and Scripting
Hello,
I have a Perl script that reads in an Excel spread sheet and formats the values into a text file. I am having trouble with one column that can have numbers or letters. Excel left justifies the values that start with a letter and right justifies the values that contain only a... (2 Replies)
Discussion started by: jyoung
2 Replies
8. Shell Programming and Scripting
I wanted a perl script to be done for Password search & replace in two files.
For Example:
Example 1)--i am having a file such as
cat /opt/customer/Ariba/UAT/ariba/app/buyer/Server/config/Parameters.table
Example 2)--and i am having a other file in other location such as cat... (4 Replies)
Discussion started by: shellscript22
4 Replies
9. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
10. Solaris
********************************
Following is not the real issue. The issue is with popen.
Plz continue forward with the thread to get a better picture.
********************************
Hi,
I am working on a customised ftp application. In it we have used sprintf to store a UNIX command... (7 Replies)
Discussion started by: diganta
7 Replies