Sponsored Content
Top Forums Shell Programming and Scripting How do l test for carriage return & Disk space usage Post 76435 by kayode on Tuesday 28th of June 2005 10:19:51 AM
Old 06-28-2005
How do l test for carriage return & Disk space usage

Hi,

I have just written a script in /bin/bash, however, l want to test if character is a carriage return or space. Also l want my script to be able to detect my disk space and send a mail if usage is more than 90% or send an alert.

Thanks

Kayode
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding disk space usage

How would I go about finding the about of disk space occupied by a certain directory? For example, /u1/cvera => 530 MB Thanks =) (3 Replies)
Discussion started by: cvera8
3 Replies

2. UNIX for Dummies Questions & Answers

how to determine the disk space usage

how can we determine the disk space used by a certain directory? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

3. Shell Programming and Scripting

Insert a line including Variable & Carriage Return / sed command as Variable

I want to instert Category:XXXXX into the 2. line something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong: sed "2i\\${n}Category:$cat\n" Sample: Titel Blahh Blahh abllk sdhsd sjdhf Blahh Blah Blahh Blahh Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies

4. Shell Programming and Scripting

script to monitor disk space usage

Some times my disk space is used upto 100% due to the application logs . So this script is to monitor the disk space usage and wall message to the users about the disk space usage if it exceeds the limit set in the script. Here for example the limit is set to 80%. This job is added in cron to... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

5. Shell Programming and Scripting

strip carriage return & append next line

Hello everyone, I am trying to search a file for lines that start with 'ip:' and have a carriage return after(ip:$). I then want to remove the carriage return from that line and append the next line in the file to the line containing 'ip'. I tried doing this with SED, but had no luck. Any... (3 Replies)
Discussion started by: vada010
3 Replies

6. Shell Programming and Scripting

Disk Usage - Space Used

Hi all, FreeBSD7.1 @ sh. In a backup script I am trying to get the blocks used by the backup once completed. I am using the function: #!/bin/sh spaceused() { du -d 0 "${1}" | awk -F"+" '{ print $1 } } to return the blocks used of said directory and contents. Via. command line... (7 Replies)
Discussion started by: Festus Hagen
7 Replies

7. UNIX Desktop Questions & Answers

Issue with disk space usage

Issue with disk space usage I have the following line in my "df -h" output: Filesystem Size Used Avail Capacity Mounted on /dev/ad4s1a 496M 495M -39M 109% / What is the issue with having 9% excess utilisation? How can I find out what this partition is... (2 Replies)
Discussion started by: figaro
2 Replies

8. Shell Programming and Scripting

Send Disk Space Usage Status via email

Hi Guys, Is there any way I can write a script that sends DISK SPACE USAGE STATUS via email once a week? Thanks, (5 Replies)
Discussion started by: g4v1n
5 Replies

9. Shell Programming and Scripting

Need Generic command for disk space usage

Given this directory /web I need to get the current usage (in %) on Linux and Unix both using the same command on bash shell ? The command i tried was working on Unix (solaris) but does not filter the desired same value when run of Linux. My command df -h /web | awk '{print $5}' | sed -n... (5 Replies)
Discussion started by: mohtashims
5 Replies

10. Shell Programming and Scripting

Generate disk space usage email alert

hi all members I have a shell script to generate disk space usage email alert if threshold is more than 80 %, now the requirement changed to keep sending alert emails for every 5% incremental usage ........ Any help would be greatly appreciated. ex - 80% , 85% ,90%,95%,100% we should get an... (6 Replies)
Discussion started by: anil529
6 Replies
ppp.Dialers(4)						     Kernel Interfaces Manual						    ppp.Dialers(4)

NAME
ppp.Dialers - PPP dialer description file format DESCRIPTION
The file describes how to dial each type of modem attached to the UNIX system that is to be made available for outbound PPP calls. exam- ines it when placing a call to a neighboring machine. When selects a line from it uses the field to select an entry in from which it uses the field to select an entry in then interprets the field from that dialer description. Format Entries are one to a line; blank lines are ignored. Comments begin with a and extend to the end of the line. Upper/lower case distinc- tions in the dialer field are significant for matching purposes, as are strings in the chat script. Fields on a line are separated by hor- izontal white space (blanks or tabs). If a chat script ends with a backslash the next line is considered a continuation of the chat script. Continuations may only occur in the midst of a chat script. Each entry must contain these fields, in this order: dialer The name of this dialer, to be matched against the dialer field in chat-script A description of the conversation that holds with the modem. Chat Script Particulars A chat script takes the form of a space-separated list of expect-send pairs. Each pair consists (at minimum) of a field to expect the end to send, then a field to send in response. Unless a string ends with will follow it by sending a carriage return character (ASCII 0x0d). Chat scripts are or where the following the hyphen is executed if the preceding fails to match received text. Certain special words may be used in the chat script to control the behavior of as it attempts to dial. Both ABORT and TIMEOUT must be in the phase of the chat script. If sees abort-string while executing the remainder of the chat script, abort the dialing attempt and note the failure in the log file. While executing the current chat script, wait timeout-time seconds for a response before considering the dialing attempt to have timed out. Writes have a fixed 60-second timeout. The expect-send couplet of 'sets the line parity accordingly: Set transmission parity based on the parity observed in characters received in strings. This is the default. Transmit characters with the parity bit set to zero (8 bits, no parity). Transmit characters with the parity bit set to one. Transmit characters with even parity. Transmit characters with odd parity. In the midst of either an string or a string, gets translated into the appropriate control character, and gets translated into x. Other special sequences are: Send or receive a space character (ASCII 0x20). Send or receive a horizontal tab character (ASCII 0x09). Send or receive a line feed character (ASCII 0x0a). Send or receive a carriage return character (ASCII 0x0d). Send or receive a backslash character (ASCII 0x5c). Send or receive a carat character (ASCII 0x5e). Send or receive the single character Ctrl-character (ASCII 0x00 through 0x1f). Send or receive a character, specified in octal digits. Pause for .25 second before proceeding (send only). Delay for two seconds before proceeding (send only). Send a break (.25 second of zero bits). Disable hangups (sets CLOCAL or LNOHANG). enable hangups (unsets CLOCAL or LNOHANG) (the default). Don't append a carriage return character after sending the preceding string (send only). Don't print succeeding send strings (e.g., a password) in any debugging or logging output. Subsequent sequences toggle mode. Insert the telephone number (found in the fifth field of here. EXAMPLES
# # Dialers - PPP dialers file # #Dialer Chat script T1600 ABORT NOsCARRIER ABORT NOsDIALTONE ABORT BUSY ABORT RRING RRING RRING ABORT ERROR TIMEOUT 5 "" AT OK-AT-OK ATS111=0DTT TIMEOUT 30 CONNECT # T2500-PEP ABORT NOsCARRIER ABORT NOsDIALTONE ABORT BUSY ABORT RRING RRING RRING ABORT ERROR TIMEOUT 5 "" AT OK-AT-OK ATS111=0DTT TIMEOUT 30 CONNECTsFAST # USRv32bis ABORT ERROR ABORT NOsANSWER ABORT NOsCARRIER ABORT BUSY ABORT RRING RRING RRING ABORT NOsDIALsTONE TIMEOUT 5 "" AT&F OK-ATQ0-OK ATB0E0X7&B1&H1&I0&K3&R2&S1 OK-AT-OK ATS01=1S02=255S19=0 OK-AT-OK ATDTT TIMEOUT 30 CONNECT AUTHOR
was developed by the Progressive Systems. SEE ALSO
pppd(1), ppp.Auth(4), ppp.Devices(4), ppp.Filter(4), ppp.Keys(4), ppp.Systems(4). RFC 1055. RFC 1144, RFC 1332, RFC 1548, ppp.Dialers(4)
All times are GMT -4. The time now is 12:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy