I'm trying to figure it out still. I know this isn't the best way to complete the task. Any tips are appreciated.
basically fnom is a log file that I want to rotate in a specific way. when the script is run, the log file will become fnom.1 and every older version is iterated by 1.
After I get the user input for the file location and name this is my script.
here is the error I am getting
If the dir only had a file named foo ... then after the script runs foo.(3-20) exist but foo.1 and foo.2 do not.
Last edited by Scott; 04-27-2010 at 06:38 PM..
Reason: Code tags, please...
I don't know anything about UNIX. I have been developing on NT platform and now a batch file I was running in my java code must work on UNIX instead. How do I change the below .bat file into a shell script that can be run on UNIX? Thanks in advance for your help.
@ECHO OFF
D:... (1 Reply)
when i run this script:
# Author: xtos
if
then
echo "Please enter ONLY one name to search, (example "$0" NAME)"
exit
fi
INPUT="grep $1 $HOME/work/phone_book"
if
then
echo "Listing not found, please try again."
else (2 Replies)
Hi Guys
Looking for a little help with a script to grep all files looking for hard coded variables - ie its IP address... so we know which files to look at before an IP change...
This is what I have - but it seems to loop and never end...
Any better suggestions?
#!/usr/bin/ksh
#simple... (2 Replies)
Hi
I am trying to add variables(float values) in a unix script but am getting an error
value=`expr $a + $b + $c`
The error I am getting is "expr: non-numeric argument"
I guess it has got to something with the decimal points.
Plz help (13 Replies)
Am trying to lean perl scripting in Unix OS to automate my tasks.
Please find the below perl script i have tried
#!/usr/bin/perl -w
print "Please Enter the VG name to be checked:";
$A = <>;
print "Please Enter the free size to be checked in GB:";
$B = <>;
$vgcheck = `vgdisplay... (7 Replies)
oopps! I Meant "Define Variables within a UNIX Script"
What would be the best way to define a variable in a unix shell script so anyone who views this script doesn't know what value is assigned to that variable.
some other location...
a="/usr/lib/fileA"
Unix script...
sed... (5 Replies)
hi guys,
i need a script that does a simple task on multiple aix servers.
if possible with both telnet and ssh.
the simple task i wanna do is connect to a server and run "ifconfig -a" and get the output. nextweek i need to do similar jobs on like 50 servers... :(
can anybody help me with making... (2 Replies)
Hey all,
I would like to ask your help and sorry in advance for my ignorance since I am a complete beginner in this.
I need to create a UNIX script that will:
- scan a small number of folders and subfolders (see a similar file tree in the attachment)
-
- for each final folder (each of... (8 Replies)
Hello All,
My name is vasu and I am very new to Unix scripting, i know basic commands, but now i need to write the following script, i have tried but no luck
My requirment is i am getting one our from another command as following
Used:1.8TB Advisory Quota:1.8TB aaa1
Used:4.5TB Advisory... (1 Reply)