- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: With one word is o.k., with more than 1 word i...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 04:03 AM
тАО12-23-2005 04:03 AM
i'm doing a script which is going to verify when a process is down.
All proceses are in a file called PROCESOS.txt, it was crated whit result of:
ps -fea > PROCESOS.txt
now, when a process is only 1 word there is no problem and this word is kept in a variable named "proceso" but when are more than 1 it can not to keep the words in the variable proceso , i'm attaching images about script and the run
where it says " el valor de fin es 11" you can see when "k vale 9" is not doing things (echo commands) progrramated in script.
My doubt is ,why can not all words in variable proceso ?
Thanks, Manuales.
Solved! Go to Solution.
- Tags:
- missing attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 04:22 AM
тАО12-23-2005 04:22 AM
SolutionPete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 04:35 AM
тАО12-23-2005 04:35 AM
Re: With one word is o.k., with more than 1 word is not ok !!!
before:
"fin" variable cold be 10 or more than 10
....
....
fin=$(echo $proc | wc -w )
.....
.....
case $m in
[9-$fin])....
...... ;;
esac
After:
fin=$(echo $proc | wc -w | cut -c1)
fin2=$(echo $proc | wc -w | cut -c2)
....
....
case $m in
9 | $fin[0-$fin2])...
....
esac
That was the solution !!!
i was using other sintax with case comand ...
Thanks, Manuales.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 04:36 AM
тАО12-23-2005 04:36 AM
Re: With one word is o.k., with more than 1 word is not ok !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 04:40 AM
тАО12-23-2005 04:40 AM
Re: With one word is o.k., with more than 1 word is not ok !!!
Input: take in the command and all the arguments and save into a file.
Output: ??
you can try the "x" option to ps -efx
which shows all of the process arguments and options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 05:56 AM
тАО12-23-2005 05:56 AM
Re: With one word is o.k., with more than 1 word is not ok !!!
Do you have any mail to email it to you ???
Manuales.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 03:22 PM
тАО12-23-2005 03:22 PM
Re: With one word is o.k., with more than 1 word is not ok !!!
nice job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 03:23 PM
тАО12-23-2005 03:23 PM