10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
There are duplicate entries in file, but uniq will not see because first field is different. How will I catch all lines, which are having duplicate IPs ?
bash-2.05# cat db.file | grep 172.30.133.11
dsrq-ctrl1-prod A 172.30.133.11
e911q-db1-nxge0 A 172.30.133.11... (4 Replies)
Discussion started by: solaris_1977
4 Replies
2. Solaris
Hi,
I am getting below error in Solaris 10 SPARC when trying to issue a search on /var/tmp partition
Below is the query
/bin/find /var/tmp/ -type f -atime +1
Below is the result
/bin/find: stat() error <File> : No such file or directory (28 Replies)
Discussion started by: prash358
28 Replies
3. Shell Programming and Scripting
Hi
Please review this script and let me know what i need to do.
This is my script
#!/bin/bash
#SCRIPT: forms.sh
#PURPOSE: Process a file line by line with redirected while-read loop.
#PURPOSE: and copy the forms to the follder
foldername=sample_dir
mkdir -p $foldername
while read... (5 Replies)
Discussion started by: Rami Reddy
5 Replies
4. Shell Programming and Scripting
:wall: My Script. :D.
I. want monitor cpu every 10 minute.
This my Script.
while true; do date ; top >> cpu.csv ; sleep 600; echo " "; echo " "; echo " "; doneYou think it Work?
if not work. please suggest.
Thank you :o (3 Replies)
Discussion started by: ooilinlove
3 Replies
5. Shell Programming and Scripting
Hello everyone,
I need some help on a perl script. The script is to open a dir and print out the date of last modification on all files. I'm been trying this code but it doesn't work.
use File::stat;
open (D,"$ARGV") or die "Can't open\n";
while (defined ($file = readdir D))
{
next... (3 Replies)
Discussion started by: new bie
3 Replies
6. Solaris
Hi All
I m having a file , path is /usr/Image/test
how i can get size of the "test" file?
is there any command for that? (3 Replies)
Discussion started by: sunray
3 Replies
7. SuSE
#!/bin/ksh
cp /etc/apache2/vhosts.d/orginal/test-yast2_vhost.conf-bk /etc/apache2/vhosts.d/test-yast2_vhost.conf
/usr/sbin/rcapache2 graceful
when i ran this script I'm getting following error.
cp: cannot stat /etc/apache2/vhosts.d/orginal/test-yast2_vhost.conf-bk no such file or directory... (1 Reply)
Discussion started by: s_linux
1 Replies
8. Shell Programming and Scripting
Hi there, I need some help with cp files from one directory into several others. The code is as follows:
SUB=`ls src_directory | wc -l`
OUT_LOOP=$(($SUB / $MK_NUMS))
IN_LOOP=$(($SUB % $MK_NUMS))
COUNT=$MK_NUMS
while ]
do
mkdir dst_directory$COUNT
ls -1 src_directory |... (4 Replies)
Discussion started by: Krush187
4 Replies
9. Solaris
JoeyG's note in the following thread got me thinking about using stat more often in file operations. I've only ever used it within perl - didn't even realize there was a commandline version of it.... (3 Replies)
Discussion started by: Smiling Dragon
3 Replies
10. Solaris
Hi,
I have a script which will check the fiel existence, the lines are as below
if !(test -d ./data) then
mkdir data
fi
In the first line error occurs as below
generatelicense.sh: syntax error at line 2: `!' unexpected
Where as this script works fine in linux OS.
How to solve... (2 Replies)
Discussion started by: krevathi1912
2 Replies