8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We have a simple menu with prompt of menu numbers to user.
It is still under construction.
Is there a way to "count" the menu choices so the prompt maximum count can be changed dynamically?
See attached TODO note in code
read_options(){
local choice
# the... (7 Replies)
Discussion started by: annacreek
7 Replies
2. Shell Programming and Scripting
I am working on a script that will parse the /proc/meminfo file and return values. I have been able to pull the MemTotal and MemFree from that file but have stumbled on the next thing I want to do - calculate memory used via subtracting MemFree from MemTotal.
Would I do something like -
... (5 Replies)
Discussion started by: flyboynm
5 Replies
3. Shell Programming and Scripting
Hi,
I have a file generated like this -
1. Fire SQL and store the formatted output in a temp file
echo "select path, empid, age from emp_tbl" | /usr/sql emp_db 2 > count_file | grep vol > tempFile
2. The tempFile looks like this after the above statement
/vol/emp1 0732 ... (9 Replies)
Discussion started by: angshuman_ag
9 Replies
4. Solaris
hi,
how can I add a new value to crontab file using a script not using the command " crontab -e " .
ex:
echo " 10 10 * * * " >> /var/spoll/cron/crontabs/<username>
how can I do that in a correct way??
thanks, (3 Replies)
Discussion started by: Ahmed waheed
3 Replies
5. Shell Programming and Scripting
Dear all,
I'm have a sorted array like this:
177
220
1001
2000
2001
2003
2005
notice that 2002 and 2004 are NOT in array.
Then user input a number INPUT, our script should return OUTPUT value like this:
if INPUT is not in array => OUTPUT=INPUT
if INPUT is in array => OUTPUT is the... (4 Replies)
Discussion started by: fongthai
4 Replies
6. Shell Programming and Scripting
Hi all,
I have a file with over 10,000 line, but I would like to update/add some code number (such as 062 below) into the line with <phone number> below:
11111<name> john matin <name>
12345<phone number> 123456 <phone number>
34556 <address> 1234 lucky road <address>
11111<name> john... (7 Replies)
Discussion started by: happyv
7 Replies
7. Shell Programming and Scripting
Hello!
I am able to add an item to the dock with this command:
defaults write com.apple.dock persistent-apps -array-add... (1 Reply)
Discussion started by: emperorfabulous
1 Replies
8. Shell Programming and Scripting
I have a file contents like this....
item1
item2
#item3
item4
#item5
item6
....
I have a KSH script to read this file into an array.
I have a for loop which will read each item...
I want to be able to skip those item start with # sign as first character in a if condiction inside the... (2 Replies)
Discussion started by: rwunwla
2 Replies