10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All!
First post...
I am working on a script that is used to recover a crashed drive from an rsync backup.
I'm down to the place where I need to create all of the directories in /mnt where I will then mount each of the volumes and begin the restore process to each volume...
I have... (3 Replies)
Discussion started by: RogerBaran
3 Replies
2. Shell Programming and Scripting
Hi
I have a shell script like that
Main() {
DAY=$(date +"%d-%m-%Y")
TIME=$(date +"%T")
Command 1
Command 2
...
Command n
}
I would like to catch errors from all commands in Main() and write these errors into a file , something likes this:
Main
if < error >
then
echo... (3 Replies)
Discussion started by: bobochacha29
3 Replies
3. UNIX for Dummies Questions & Answers
Hi, guys, I am trying to automate a sftp process using "expect" method (since the key authentication method is disabled in my company network, there is no helping it).
In order to try, I type in the command manually:
sftp @ > << EOF
>cd
>ls -l
>EOF
>Connecting to
@servername password:
... (3 Replies)
Discussion started by: warmboy610
3 Replies
4. Shell Programming and Scripting
Hi,
I am trying to count the number of times a string of letters occurs in a file for multiple unique strings of letters. Right now I can do this one at a time using the following code (in this example I am searching for the string "AAA"):
echo AAA >> outfile.txt
grep -c "AAA" -r... (4 Replies)
Discussion started by: gecko1
4 Replies
5. Shell Programming and Scripting
Hi,
I am trying to create a shell script to automate the following process of getting svn stats:-
Step1:- cd to checkout location.
Note that the checked code have multiple modules in respective folders
Step2:- Execute this command inside each module:-
svn log -v --xml >... (0 Replies)
Discussion started by: d8011
0 Replies
6. UNIX for Dummies Questions & Answers
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
Discussion started by: evelibertine
4 Replies
7. Shell Programming and Scripting
Can anyone help me out in visualizing on what is the logic behind simple unix commands. For Eg: ls command lists files and directories, how it displays I need to know the source code for commands like this. (1 Reply)
Discussion started by: rahul_11d
1 Replies
8. Shell Programming and Scripting
can anyone help me in writing a shell script to visualize how simple commands work and on what logic. For Eg: ls command how it lists out all the files and directories, need to write a simple script based on the commands source code.:D (0 Replies)
Discussion started by: rahul_11d
0 Replies
9. UNIX for Advanced & Expert Users
This is my first post so hello to all of you!
I have a script in bash-3.00 that needs to execute the following:
pkgrm (to remove an existing package)
pkgadd -d ( to install a new package)
The problem is that both commands prompt me to answer either y,n or q in order to proceed with... (13 Replies)
Discussion started by: Insight
13 Replies
10. Shell Programming and Scripting
Hi,
I want to call multiple java commands through a .sh file. I have drafted one with my least knowledge. But its not working. Pls help. I am trying to run this from Sun Solaris (OS 5.10) server with 10g oracle database.
echo \* starting script AUTORUN
echo \* get the Monitor path... (4 Replies)
Discussion started by: vivekdn
4 Replies
NNGOBACK(1) General Commands Manual NNGOBACK(1)
NAME
nngoback - make news articles unread on a day-by-day basis (nn)
SYNOPSIS
nngoback [ -NQvi ] [-d] days [ group ]...
DESCRIPTION
nngoback will rewind the .newsrc record file of nn(1) one or more days. It can be used to rewind all groups, or only a specified set of
groups. In other words, nngoback can mark news articles which have arrived on the system during the last days days unread.
Only subscribed groups that occur in the current presentation sequence are rewound. That means that if no group arguments are specified,
all groups occurring in the sequence defined in the init file will be rewound. Otherwise, only the groups specified on the argument line
will be rewound.
When a group is rewound, the information about selections, partially read digests etc. are discarded. It will print notifications about
this unless the -Q (quiet) option is used.
If the -i (interactive) option is specified, nngoback will report for each how many articles can be marked unread, and ask for confirmation
before going back in that group.
If the -v (verbose) option is specified, nngoback will report how many articles are marked unread.
If the -N (no-update) option is specified, nngoback will perform the entire goback operation, but not update the .newsrc file.
If you are not up-to-date with your news reading, you can also use nngoback to catch up to only have the last few days of news waiting to
be read in the following way:
nn -a0
nngoback 3
The nn command will mark all articles in all groups as read (answer all to the catch-up question.) The following nngoback will then make
the last three days of news unread again.
Examples:
nngoback 0
Mark the articles which have arrived today as unread.
nngoback 1
Mark the articles which have arrived yesterday and today as unread.
nngoback 6
Mark the articles which have arrived during the last week as unread.
You cannot go more than 14 days back with nngoback. (You can change this limit as described below.)
THE BACK_ACT DAEMON
It is a prerequisite for the use of nngoback that the script back_act is executed at an appropriate time once (and only once) every day.
Preferably this is done by cron right before the bacth of news for `today' is received. back_act will maintain copies of the active file
for the last 14 days.
Optionally, the back_act program accepts a single numerical argument specifying how many copies of the active file it should maintain.
This is useful if news is expired after 7 days, in which case keeping more than 7 days of active file copies is wasteful.
FILES
~/.newsrc The record of read articles.
~/.newsrc.goback The original rc file before goback.
$db/active.N The N days `old' active file.
$master/back_act Script run by cron to maintain old active files.
SEE ALSO
nn(1), nncheck(1), nngrab(1), nngrep(1), nnpost(1), nntidy(1)
nnadmin(1M), nnusage(1M), nnmaster(8)
NOTES
nngoback does not check the age of the `old' active files; it will blindly believe that active.0 was created today, and that active.7 is
really seven days old! Therefore, the back_act script should be run once and only once every day for nngoback to work properly.
The days are counted relative to the time the active files were copied.
AUTHOR
Kim F. Storm, Texas Instruments A/S, Denmark
E-mail: storm@texas.dk
4th Berkeley Distribution Release 6.6 NNGOBACK(1)