10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can someone convert the code into perl ?
x=(a b c)
y=(d e)
times=$((${#x} * ${#y}))
((xi=yi=0))
for((i=1;i<=times;i++,xi++,yi++))
do
if((xi>${#x}-1));then xi=0;fi
if((yi>${#y}-1));then yi=0;fi
print ${x},${y}
done (4 Replies)
Discussion started by: giri_luck
4 Replies
2. Programming
Hello,
Fairly simple really I have an xml file and I want to check to see if it contains a pattern. The pattern is "../"
On the command line I can type: grep "\.\./" myFile.xml
and I get desired result.
To do the same thing in a perl script I thought it was as simple as putting the ``... (4 Replies)
Discussion started by: Jaymoney
4 Replies
3. Shell Programming and Scripting
Hi ,
Could someone please help me for following script:
perl -pi -e 's/\"//g' ${FILELIKE}*.csv
perl -pi -e '$_ ="" if ($.==1);' ${FILELIKE}*.csv
What these 2 commands are doing?
Thanks,
Preetpal
How to use code tags (4 Replies)
Discussion started by: preetpalkapoor
4 Replies
4. Shell Programming and Scripting
Hi All
I got stuck in an issue, and i want help from you guys. The issue is-:
I have two scripts one is call.sh(written in Unix) and another one is called.pl(written in Perl). What i do is i invoke the script call.sh and inside of call.sh the Perl script is called called.pl.
There is some... (4 Replies)
Discussion started by: parthmittal2007
4 Replies
5. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
6. Shell Programming and Scripting
Very new to UNIX, so still getting used to all this.
I made a Perl script where I want to create a spreadsheet file when extracting "data" from a text file.
Now, this works perfectly fine on my Windows OS since I'm using the Win32 libraries with Microsoft Excel, but when I want to try it out on... (0 Replies)
Discussion started by: kooshi
0 Replies
7. Shell Programming and Scripting
Hi All,
This below command is working fine with unix box. However i could not able
to run it in PERL. kidly suggest???
perl -ne '{push @x, $_}END{pop(@x); print @x}' create2.txt (15 Replies)
Discussion started by: adaleru
15 Replies
8. Shell Programming and Scripting
i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies
9. Shell Programming and Scripting
I understand that in order to run basic unix commands I would normally type at the prompt, I would have to use the following format
system(ls -l);
or
exec(ls -l);
But when I actually try to use the command, the script fails to compile and keeps telling me there is an error with this line. ... (1 Reply)
Discussion started by: userix
1 Replies
10. Shell Programming and Scripting
Hi,
I have a perl script. It needs to open a file but the file that it will open will depend on the result of a unix command "tail -1". How can I do that in perl, to open a file which is the results from a unix command? Thanks in advance! Hope you can help me. (2 Replies)
Discussion started by: ayhanne
2 Replies