12-22-2009
thanks everyone. I'm still having problems with the script, but I'm sure these solutions are correct.
10 More Discussions You Might Find Interesting
1. HP-UX
I'm adding additional route on hpux 11.22 and syntax seems to be wrong to me. However the application works and everything else.
Old systax in netconf file.
LANCONFIG_ARGS=ether
ROUTE_GATEWAY=xxx.xx.xx.xx
ROUTE_COUNT=1
ROUTE_DESTINATION=default
Note: There are no double Quotations? is this... (0 Replies)
Discussion started by: catwomen
0 Replies
2. UNIX for Advanced & Expert Users
Im running reports on a unix box.
i run df -g and get the disk usage results, what i want to do is hopefully run an if statement or of the sort to highlight any percentages over 80 %.
I also would like to run an errpt and also highlight any errors for the current days date.
Could the results... (1 Reply)
Discussion started by: hassanj
1 Replies
3. Shell Programming and Scripting
In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands.
How do I write the "do nothing" statement in the following example?
Example:
if (( "$x"="1" && "$y"="a" && "$z"="happy" ))
then
do nothing
else
command
command
fi... (3 Replies)
Discussion started by: april
3 Replies
4. UNIX for Dummies Questions & Answers
Hello folks,
I am relatively new to UNIX shell scripting but I have just written this small for loop script below:
var="100 300"
for ctr in ${var}
do
echo "$ctr --- $var"
done
exit 0
But when I am running the script I am getting the error below:
' unexpected: syntax error at line 4 :... (3 Replies)
Discussion started by: Rajat
3 Replies
5. Shell Programming and Scripting
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
I'm currently writing a script that looks at the contents of a file and returns a value, based on a user input-
do
cat ~/LAFILE | grep "$SYSTEM" | grep "$USERNAME"
if ! grep user /etc/passwd >/dev/null 2>&1
then
echo "did not find user"
else
echo "found user"
fi
break... (4 Replies)
Discussion started by: Great Uncle Kip
4 Replies
7. Shell Programming and Scripting
I'm trying to do a for statement within a while read line statement and it's not working. What is wrong with this?
while read line
do
find . -type f -name "*.$line*" -exec gunzip {} \;
for file in */*.$line*;
do grep ERROR "*.$file*" > error.$line.log;
done
find . -type f -name... (1 Reply)
Discussion started by: bbbngowc
1 Replies
8. Shell Programming and Scripting
greetings,
the goal below is to test the supplied options/arguments for validity. if the matlab option is not supplied with the additional option of a file then exit. however if matlab IS supplied with its companion option of a file OR batch is the only option then continue on. it's clear the -a... (3 Replies)
Discussion started by: crimso
3 Replies
9. Shell Programming and Scripting
I am new to Unix and have been given the task of modifying a current script. Most of the programming I do is Oracle based, not unix.
That being said when I run my current script i get the following (not sure if this is an actual error or if it is just being informative)
./test_cron.s: cdev:... (3 Replies)
Discussion started by: biobill
3 Replies
10. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
script(1) User Commands script(1)
NAME
script - make record of a terminal session
SYNOPSIS
script [-a] [filename]
DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the
record is saved in the file typescript. See WARNINGS.
The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends
when the forked shell exits or when Control-d is typed.
OPTIONS
The following option is supported:
-a Appends the session record to filename, rather than overwriting it.
NOTES
script places everything that appears on the screen in filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a
privileged user, that is, root. Be sure that typescript is not a link before running script.
SunOS 5.10 30 Jan 2004 script(1)