10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files.
is there a way to speed things up?
Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Discussion started by: f77hack
4 Replies
2. Shell Programming and Scripting
Hi,
On linux i have the below command working fine.
grep -o '<name>.*</name>' deploy.tmp | sed 's/\(<name>\|<\/name>\)//g' deploy.tmp
But the same is failing on Solaris
uname -a
SunOS mymac 5.10 Generic_150400-23 sun4v sparc sun4v
Can you tell me how can i get it work on Solaris ?... (6 Replies)
Discussion started by: mohtashims
6 Replies
3. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a number of files containing the information below.
"""""
Fundallinfo
6.3950 14.9715 14.0482
"""""
I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
Discussion started by: Paul Moghadam
2 Replies
5. Shell Programming and Scripting
Hello Colleagues,
I have a file that looks like below.
6-12731913-12731913
9230760143480
410018547148230
20131002193434+0500
20131002193434+0500
;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0
20131009
92220056296730
CC0P
abc
Core_Context_R1A
SMS
6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies
6. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Could you please suggest a tool that connects like WINSCP/Putty and allows me to search a remote Unix directory for a certain text pattern (grep) ?
Regards,
Bhanja. (1 Reply)
Discussion started by: bhanja_trinanja
1 Replies
8. Shell Programming and Scripting
STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
# THIS IS THE MAIN FILE.
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address... (6 Replies)
Discussion started by: irongeekio
6 Replies
9. Shell Programming and Scripting
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Discussion started by: hariza
4 Replies
10. Shell Programming and Scripting
I am trying to get a count of each line
sub runit2 {
my ($file1a, $file2a) = @_;
my $file1_vala = $file1a->get;
my $file2_vala = $file2a->get;
open (FILE1a, "$file1_vala") or die;
open (FILE2a, "$file2_vala") or die;
chomp(my @strings = <FILE2a>);
while (1) {
foreach $pattern... (4 Replies)
Discussion started by: popeye
4 Replies