Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to email the current directory? Post 302824493 by rnmuk on Friday 21st of June 2013 03:32:12 AM
Old 06-21-2013
How to email the current directory?

Hi, I'm very new to Unix, but have been given a command to type in which is :

Code:
mail -s <email subject goes here>  <my email address> <success.txt

this command is quite a basic one and sends an email containing the contents of the file "success.txt" to whatever email I put in with the subject of the email after the -s and works fine. What I would like to do is replace the subject of the email with the current folder name, but don't want to type it in directly I want Unix to enter the follder name automatically, is this possible, maybe by using the "pwd" command?

Last edited by Scott; 06-21-2013 at 04:38 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to see all file in a current directory

Hi, I am unable to see all files in a current directory when use "ls -lrt" command it is giving error message as below ( I think this current directory is having about 500 files) <CONTROL /home/ckanth/sri>ls -lrt UX:ls: ERROR: Out of memory: Insufficient or invalid memory But when i... (3 Replies)
Discussion started by: srikanthus2002
3 Replies

2. UNIX for Advanced & Expert Users

cannot determine current directory

Hi, when I execute some simple commands on my solaris system, I am getting the following warning message: Could anybody tell me what could be the reason Ex:- If I give the command, which ls Warning: cannot determine current directory ... (15 Replies)
Discussion started by: axes
15 Replies

3. Shell Programming and Scripting

filename in current directory

I want to perform a task on all the files in the current directory but I'd like to loop through them one at a time. How do I tell it to give me the first filename? (2 Replies)
Discussion started by: calgone337
2 Replies

4. Shell Programming and Scripting

non recursive search in the current directory only

Hi, Am trying for a script which should delete more than 15 days older files in my current directory.Am using the below piece of code: "find /tmp -type f -name "pattern" -mtime +15 -exec /usr/bin/ls -altr {} \;" "find /tmp -type f -name "pattern" -mtime +15 -exec /usr/bin/rm -f {} \;" ... (9 Replies)
Discussion started by: puppala
9 Replies

5. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

6. Shell Programming and Scripting

tarball of current directory

I wanna make a backup tarball. I wanna write a script that makes tarball of the current directory. There are lots of files so I cant type all files, I wanna make the tarball by excluding few files. Like there 1000 files in a directory I wanna create a tarball containing 98 files of that... (1 Reply)
Discussion started by: nishrestha
1 Replies

7. UNIX for Advanced & Expert Users

current directory in awk

Hello, I want to use the string with the current directory in my awk command. I tried: 'pwd=system("pwd")' but it doesn't work. can please help somebody? (2 Replies)
Discussion started by: daWonderer
2 Replies

8. UNIX for Dummies Questions & Answers

Current working directory

Hi all, How do I print the name of my current working directory only to screen? Not pwd! For example, if I was in /home/work I am looking for 'work' only (4 Replies)
Discussion started by: jimjam
4 Replies

9. UNIX for Dummies Questions & Answers

How to get the current directory Path?

How to get the current directory Path in your prompt? i am getting a $ mark only in my prompt? Please help me with this (3 Replies)
Discussion started by: Abhishek0683
3 Replies

10. Shell Programming and Scripting

How to send a file in UNIX through email which is created only 15 minutes before the current time?

I wanted to send an email to the client whenever there is failed record created in a /feed/HR-76/failed folder after processing of feed file. I can find out with the help of below script that what is the new file created but that file didn't make just 15 minutes before. ... (1 Reply)
Discussion started by: puneetkhullar
1 Replies
IRSEND(1)							   User Commands							 IRSEND(1)

NAME
irsend - basic LIRC program to send infra-red commands SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...] DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such as TV boxes, HiFi sets, etc. DIRECTIVE can be: SEND_ONCE - send CODE [CODE ...] once SEND_START - start repeating CODE SEND_STOP - stop repeating CODE LIST - list configured remote items SET_TRANSMITTERS - set transmitters NUM [NUM ...] SIMULATE - simulate IR event REMOTE is the name of a remote, as described in the lircd configuration file. CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file. NUM is the transmitter number of the hardware device. For the LIST DIRECTIVE, REMOTE and/or CODE can be empty: LIST "" "" - list all configured remote names LIST REMOTE "" - list all codes of REMOTE LIST REMOTE CODE - list only CODE of REMOTE The SIMULATE command only works if it has been explicitly enabled in lircd. -h --help display usage summary -v --version display version -d --device use given lircd socket [/var/run/lirc/lircd] -a --address=host[:port] connect to lircd at this address -# --count=n send command n times EXAMPLES
irsend LIST DenonTuner "" irsend SEND_ONCE DenonTuner PROG-SCAN irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3 irsend SEND_STOP OnkyoAmpli VOL-DOWN irsend SET_TRANSMITTERS 1 irsend SET_TRANSMITTERS 1 3 4 irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S" FILES
/etc/lirc/lircd.conf Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave- form details. DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics: "irsend: could not connect to socket" "irsend: Connection refused" (or "Permission denied"). SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org. irsend 0.9.0-pre1 October 2010 IRSEND(1)
All times are GMT -4. The time now is 12:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy