9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a little code block (executing on AIX 7.1) that I cannot understand why the NOTFREE=0 does not appear to be assigned even though it goes through that block. This causes a unary operator issue.
#!/bin/bash
PLATFORM="AIX"
NEEDSPC=3000
set -x
if ; then
lsvg | grep -v rootvg | while... (6 Replies)
Discussion started by: port43
6 Replies
2. Shell Programming and Scripting
I have been trying to remove empty lines and lines just filled with spaces. I have used the following command which does work.
sed -i "/^\s*$/d"
Except it leaves one single trailing line at the very end of the file. For the life of me I cant figure out why I cant remove that last trailing... (2 Replies)
Discussion started by: user8282892
2 Replies
3. Shell Programming and Scripting
Suppose I have a file named Stuff in the same directory as my script. Does the following assign the file Stuff to a variable?
Var="Stuff"
Why doesn't this just assign the string Stuff? Or rather how would I assign the string Stuff to a variable in this situation?
Also, what exactly is... (3 Replies)
Discussion started by: Riker1204
3 Replies
4. Shell Programming and Scripting
Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies
5. Homework & Coursework Questions
Please take a look I am stuck on step 4
1. The problem statement, all variables and given/known data:
#!/bin/bash
### ULI101 - ASSIGNMENT #2 (PART A) - DUE DATE Wed, Aug 3, 2011, before 12 midnight.
###====================================================================================
###... (13 Replies)
Discussion started by: almirzaee
13 Replies
6. Shell Programming and Scripting
Hi guys,
I'm basically looking for some help with a bash script I've written. It's purpose is to assign process to individual CPU cores once that process hits 15% CPU usage or more. If it drops below 15%, it's unassigned again (using taskset).
My problem is that I can't think of a way to... (2 Replies)
Discussion started by: mcky
2 Replies
7. UNIX for Dummies Questions & Answers
I have a script wherein I access each line of the file using a FOR loop and then perform some operations in each line. The problem is each line that gets extracted in FOR loop truncates trailing blank spaces and control characters (^M) that is present at the end of each line. I don't wan this to... (5 Replies)
Discussion started by: Shobana_s
5 Replies
8. Shell Programming and Scripting
I want to remove the trailing spaces from any line of file.
line ending does not follow any pattern.
plz help (3 Replies)
Discussion started by: vikas_kesarwani
3 Replies
9. Shell Programming and Scripting
Hello folks,
Is there a simple way to trim trailing spaces from each line a file. Please let me know.
Regards,
Tipsy. (5 Replies)
Discussion started by: tipsy
5 Replies