9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guys,
I am trying to find a way within a bash script to check a file that exists in the same directory to ensure every line starts with 44 and is 12 digits long. If it doesn't then print some sort of text advising of the error and stop the script from going any further. If all lines... (1 Reply)
Discussion started by: mutley2202
1 Replies
2. Shell Programming and Scripting
I'm extremely new to shell scripting so I apologize for the crudeness of my descriptions. I am editing a script that will write files (e.g. Job0_A.com, Job1_A.com, etc.) and then run them through a program called gaussian (computational chemistry program). The script will then take the output files... (10 Replies)
Discussion started by: butson
10 Replies
3. UNIX for Dummies Questions & Answers
Hi all
So I am thinking my inability to cope with math is bogging me down here so Im asking for help.
I want to determine how long a user has been logged on for by using the date and who commands to determine the time they have been logge don.
My problem is that I keep getting the wrong... (2 Replies)
Discussion started by: losingit
2 Replies
4. Shell Programming and Scripting
Hello
I need to source a script. But that script terminates with a trailing exit. Which exits my script. I'm using bash, and this doesn't work:
trap 'echo disabled' EXIT
source other_file
trap '' EXIT
Instead, it calls my trap, but then exits anyway. I could get disgusting and... (4 Replies)
Discussion started by: brsett
4 Replies
5. Shell Programming and Scripting
My admin needs a shell script in Korn that will show conditions based on users logged in. I have never used the Korn shell and have no clue what I am doing, can anyone help.
here are the conditions that need to be returned.
if users are below 5
displays should be: performance is high
if... (1 Reply)
Discussion started by: vthokiefan
1 Replies
6. Shell Programming and Scripting
I know that when I'm logged in as root in (Solaris or Linux), I would get the # sign at the terminal screen.
But from a csh script, how do I know if I'm running that script logged in as root or not? (3 Replies)
Discussion started by: newbie09
3 Replies
7. Shell Programming and Scripting
Hi,
Here is the script that I have written to check if a particular user is has logged out, and if yes, then a mail needs to be sent to the management the details of whatever has been captured by the script command.
echo "The current users are:"
who | awk '{print $1}' | sort > temp1
cp... (1 Reply)
Discussion started by: ggayathri
1 Replies
8. Shell Programming and Scripting
I'm attempting to write a pretty simple script. It opens a Filemaker file successfully. That Filemaker file takes around 30-90 seconds to finish. When it's done, it writes a few .xml files into the same directory where my shell script and the Filemaker script reside.
In my script, how can I... (2 Replies)
Discussion started by: alternapop
2 Replies
9. Shell Programming and Scripting
writing a script that will check every 5 seconds whether a particular user has
logged into the system
# Determine if someone is logged on
# Version 4.0
if
then
echo “ Incorrect number of arguments”
echo “Usage: $ ison4 <user>”
else
user=“$1”
if who | grep “$user” > /dev/null
then... (2 Replies)
Discussion started by: kim187
2 Replies