![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help - shell script newbie | eback | Shell Programming and Scripting | 2 | 10-15-2007 06:28 PM |
| Shell Scripting Newbie | mattyjim2 | UNIX for Dummies Questions & Answers | 1 | 10-11-2007 07:20 AM |
| A few questions from a newbie(shell script) | perk_bud | Shell Programming and Scripting | 5 | 07-21-2007 06:59 AM |
| NEWBIE: If and Find in shell script | meskue | Shell Programming and Scripting | 1 | 06-30-2006 02:28 AM |
| Newbie using sed in a shell script | ktoz | Shell Programming and Scripting | 1 | 05-26-2003 06:07 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Can someone help me write this shell script? I am completely new to shell and as a fun task my uncle has challenged me a problem (out of all other people). Basically, all he wants me to do is to create backup file in a folder that is named “disables.” This is what he said: create a shell script to backup all “profiles” with are disabled (or inactive) before you start deleting those files. Here is what he provided me with, I am supposed to use/ manipulate his previously used script so it works for me and what I need to get done. From what I understand he wants me to find certain profiles that are “disabled” and put them into a txt file: disabled.txt but I have no clue how to code this...I've never used Shell in my life =( Code:
home1:t13hal2/backups # wlsmon -s $h > $h.sh home1:t13hal2/backups # cd .. home1:t13hal2 # ls .profile* MonitorTypes.sh* cmdfile.sh inputFile.txt .sh_history all_dm_profiles.txt disabled.sh* logfile .vi_history backups/ disabled.txt home:t13hal2 # cat disabled.sh #!/bin/sh wlookup -Lar SentryProfile |grep -v @ > all_profiles.txt while read h;do discount=`wlsmon $h |grep -c disabled` if [ $discount -gt 0 ];then echo "PROFILE:$h COUNT:$discount" fi done < all_profiles.txt ANY HELP WILL BE APPRECIATED...THANKS IN ADVANCE Last edited by vidyadhar85; 06-08-2009 at 10:54 PM.. Reason: code tag added |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|