10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Experts,
I'm writing script to find out last files and its modified date - unfortunately am having problem with the below script.
Error message:
"grep: sales.txt: No such file or directory"
#!/bin/bash
var=1
var1=`awk '{n++} END {print n}' sales.txt`
while ]
do
prod=$var... (6 Replies)
Discussion started by: parpaa
6 Replies
2. UNIX for Advanced & Expert Users
Hi all,
actually i have a lot of IP addresses on multiple .xml files on my folder,
my tag on xml files are like this,
<db-url>jdbc:oracle:thin:@10.100.5.56:1521:DWH01</db-url>
i actually can print only the IP addresses
awk -F"" '/url/ { print $3 }' *.xml
10.100.5.56
i would like to grep... (2 Replies)
Discussion started by: charli1
2 Replies
3. Shell Programming and Scripting
Hi,
I'm having trouble with a script to copy one line out of multiple files in a directory and copy to a file called test. I've tried the code below but it copies one line out of the first file multiple times not one line out of all the files. Would someone help? I'm very new to all this.
... (8 Replies)
Discussion started by: bob101
8 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I have a csv file that appears as follows:
,2013/03/26,2012/12/26,4,1,"2017/09/26,5.75%","2017/09/26,1,2018/09/26,1,2019/09/26,1,2020/09/26,1,2021/09/26,1",,,2012/12/26,now when i use the split function like this:
my @f = split/,/; the split function will split the data that is... (2 Replies)
Discussion started by: WongSifu
2 Replies
5. 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
6. Shell Programming and Scripting
Hi all,
When I put the Perl command in a script, I got error.
system("perl -pi -e 's@words@words@g' myFile");
The error is:
Unrecognized character \x8A; marked by <-- HERE after دت مد�<-- HERE near column 15 at -e line 1.
Thanks in advance.
---------- Post updated at 06:30 AM... (0 Replies)
Discussion started by: Lham
0 Replies
7. UNIX for Dummies Questions & Answers
I have two text file....
One text file contain in this format......
keyvalue.txt \SUM\SUM_cam.c
\SUM\SUM_cam.h
\SUM\SUM_command.c
\SUM\SUM_command.h
\SUM\SUM_dab.c
\SUM\SUM_dmb.c
\SUM\SUM_eventHandler.h
\SUM\SUM_eventHandler_dab.c
\SUM\SUM_eventHandler_dmb.c ... (6 Replies)
Discussion started by: suvenduperl
6 Replies
8. Shell Programming and Scripting
Hi!
I have a need to do this in Perl.
script.pl -config file
The script would be doing a wget/LWP on a URL which is defined in the config file.
So when I run the script it should return either one of these conditions -
1) OK with exit status 0.
Should also print "wget URL"
2)... (6 Replies)
Discussion started by: jacki
6 Replies
9. Shell Programming and Scripting
hi guys,
i have a query, i wrote a perl script that will collect cpu statistics
Scripts/myScripts/
cpu.pl
i want to make this file so that i can run it from any location on any drive,
without giving the path explicitly.
like
$/home/ravi/perl
cpu.pl
i tried this... (8 Replies)
Discussion started by: niteesh_!7
8 Replies
10. Shell Programming and Scripting
hi
i am using perl on windows ( active state perl 5.8 ) and i want to check for Control-M (^M) in file. files to be checked are in unix format so new line character is (\n). This perl script is called from Batch file ( windows .BAT file )
my script is
while (<PROGRAM>) {
... (12 Replies)
Discussion started by: zedex
12 Replies