I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool).
But I would like to know why passwd command isnt working in scripts? (1 Reply)
im trying to get an ARP readout using the command 'arp -a'... but the command doesnt exist in Fedora Core 6 - IPv6.... is there an equivalent command? (4 Replies)
I am using Ubuntu linux desktop, and I am trying to schedule a sheel script to run every 10minutes.
These are the steps I have taken:
crontab -e
added and saved this line to the file
# m h dom mon dow command
*/1 * * * * /home/enzo/Desktop/dlrecentuse
restarted cron:
sudo... (5 Replies)
I need help running a script. I have the script looking into a folder and converting .doc files to .odt. The script works fine except that I want it to only run when .doc files are present. If I can do this then I can put .xls files and .ppt files in the folder and convert them when they are... (2 Replies)
Hi,
Another problem, here is my code
#!/bin/sh
dir='/opt/apps/script/CSV'
datadir='/opt/apps/script/data'
while : ; do
ls -1rt $dir/*.csv > /dev/null 2>&1
if ;then
cp $datadir/weekly.txt $dir/weekly.csv
else
exit 0
fi
done (10 Replies)
Hi I have a job that has been running for a while with the following statement to cleanup a directory:
find /dbmgtu01/app/myplace/log ! \( -name "dc*" -o -name "sc*" -o -name "ms*" \) -type f -mtime +30 -print -exec rm {} \ ;
The directory was recently changed to a mount point, with a symbolic... (2 Replies)
Hi there, normally if I want to remove a user tht I have added to a specific group, i would do the following
this is what my group2 looks like
# grep group2 /etc/group
group2:x:7777:user2,user1,user4
user1 has been defined in a few groups
# id -nG user1
group1 group2 group3
So... (3 Replies)
Hello Everyone,
I'm currently have a requirement where I've generated a list of files with specific attributes and I need to know what lines are similar between the two files. For example:
-File 1-
line1
line2
line3
-File 2-
line1
line2
line4
line5
-Desires Output-
line1
line2... (5 Replies)
Hi,
I am unable to achieve the file exist conditions if there are multiple files same similar name for e.g. in a $Direct i am having files like
aus.txt
aus.txt_pr
aus.txt_2012
i need to put a file exist condition like which is not working
then
echo "File present"
but the... (9 Replies)
I have a file "file1" that contains several ip address , and the "file2" contains several records , each line in file2 contains somewhere the ip address that i am searching in the file1
I use the unix command grep -w
for i in `cat file1`
do
grep -w "$i" file2 >> file3
done
... (9 Replies)