Sponsored Content
Top Forums Shell Programming and Scripting Creating dated folder name in SMB share Post 303001827 by sdch1000 on Friday 11th of August 2017 05:32:59 PM
Old 08-11-2017
Creating dated folder name in SMB share

I can't seen to figure this out. Let's say I want to create a folder with the name "August2017". In regular terminal prompt I can type
Code:
mkdir `date +%B%Y`

But when I'm connected to a SMB share (at the smb: prompt), the command doesn't translate properly. A folder gets created but the name is `date

What's the correct syntax to get this working?

Thanks!
Moderator's Comments:
Mod Comment Please use CODE tags (not B tags) when displaying sample input, output, and code segments.

Last edited by Don Cragun; 08-11-2017 at 07:07 PM.. Reason: Change B tags to CODE and ICODE tags.
 

9 More Discussions You Might Find Interesting

1. Linux

how i can share from fc5 folder

hai friends i am using fc5 i configured samba and i can access windows files and folders in my network of linux. but in windows(xp.2000) i can not access my fc5 folder. pls x-xplain me anybody what i need to do in gui of fc5 for to enable to share my files and folders to windows(my samba... (0 Replies)
Discussion started by: sadiquep
0 Replies

2. HP-UX

How to Share out a folder in Hp UX 10.20 OS

Hi all, I'm new to UNIX and recently i just being assign to work with a HP UX 10.20 Operation Systems. So i wonder if i can share out some folder in the system as this UNIX is link to another Windows base PC. My purpose is to do some auto file maintenance where i can copy/delete files in UNIX... (1 Reply)
Discussion started by: sim2004
1 Replies

3. Solaris

how to share a folder from windows xp to solaris 8

how to share a folder from windows xp to solaris 8? with out using samba?it is possible or not for sharing a folder between windows and solaris 8 (1 Reply)
Discussion started by: tv.praveenkumar
1 Replies

4. Shell Programming and Scripting

Apache/CGI Bin Accessing mounted SMB share

Hey Guys, I need to copy some files from my Apache server to SMB share ... copy $file,"/Volumes/v1/x/test/$datestamp$name$suffix" Unfortunately this command when executed from Apache/cgi-bin is not able to access mounted volumes .. is there anything that can be done about that ... Can... (1 Reply)
Discussion started by: NDxiak
1 Replies

5. Solaris

mounting windows share folder

please help me,,i need step to mount windows share folder,,i try samba and nfs and it didnt work (in my linux server the command is fine),,can somenone give me an example for this to be done? (0 Replies)
Discussion started by: Cellscript
0 Replies

6. Solaris

mount windows share folder

all,,i need help,,i try to mount a windows 2000 share folder to my system,,i already userd smb mount,mount -F and bunch of stuff and none is working,,can anyone give me a script to this?? PS : when i use mount -F i got this message : nfs mount: insufficient privileges ,,, is it must be root ? (6 Replies)
Discussion started by: Cellscript
6 Replies

7. OS X (Apple)

SMB Connection Resolve to AD, Point to User Share

I've got an unusual problem that deals with connecting via SMB under Snow Leopard, to a directory share with over 1,000 users. When I connect to the main directory share, the next level reveals 1,000 users, but I'd like to have the connection identify me as a registered user in AD at the time of... (0 Replies)
Discussion started by: unimachead
0 Replies

8. Solaris

creating a share file

Hello Solaris Gurus, can anyone please explain to me how to create a share file to share across network? Thanks (2 Replies)
Discussion started by: cjashu
2 Replies

9. Solaris

auto mount SMB share on Solaris 10

I CANNOT use autmounter so should I just write the command as an /etc/rc script or is it possible to auto mount the share via the vfstab? (4 Replies)
Discussion started by: LittleLebowski
4 Replies
comp(1) 						      General Commands Manual							   comp(1)

NAME
comp - compose a message (only available within the message handling system, mh) SYNOPSIS
comp [msg] [+folder] [options] OPTIONS
Specifies the folder in which the draft message is created. If you do not send the draft, it is stored in this folder. This option is usually set up in your See mh_profile(4) for more information. If you have this option set up, you can override it by using the -nodraftfolder option. Specifies the name of a file in which a draft message is created. If no absolute pathname is given, this file is assumed to be in your Mail directory. If the file already exists, the mail system will ask you what you want to do with its contents before the draft message is created. If the named file does not contain a message header, the -draftmessage option does not create one. If you want to create a message in an empty file, use the -file option. You cannot use -draftmessage to specify a file name with the -draftfolder option. Specifies the editor used to create the draft message. The default editor is prompter; see prompter(1). You can specify any approved editor as an alternative. If you regularly use the same editor, you can specify it in the Editor: line of your entry sets up vi as the editor you use to com- pose mail messages: Editor: /usr/ucb/vi Uses the named file to create the draft message in. If no absolute pathname is given, the file is assumed to be in your Mail directory. If the file already exists, the mail system will ask you what you want to do with its contents before the draft is created. Unlike the -draftmessage option, this option creates a message header for a new draft. This means that you can create a draft in an empty file and send it successfully. Specifies an alternative mail header for your draft. The named form-file contains a message header, which comp uses when it creates the draft message. If no absolute pathname is given, it is assumed that the file is in your Mail directory. If you do not specify the -form option, comp takes the message header from the components file in your Mail directory, or, if this does not exist, it uses the system default header. You cannot use the -form option with either a +folder or a msgs argument. Prints a list of the valid options for this command. Creates a draft without invoking an editor. You are placed immediately at the What now? prompt, without being given the opportunity to edit the draft at all. This option is only useful if you are sending an existing draft using the -use option to comp. Otherwise it will produce a draft with no addresses and no content. Uses an existing draft as the new draft message. If you have saved a pre- vious unsent draft in a drafts folder or in the draft file, you can edit and send it using the -use option. The previous draft is displayed on your screen and the editor is invoked to allow you to edit the draft. When you exit from the editor, you receive the What now? prompt in the usual way. If you have a draft folder set up, or specify one with the -draftfolder option, the mail system will use the current draft in that folder as the new draft message. If you do not have a draft folder, it will use the contents of the draft file. If you do not want to use the current message in a folder, you can supply a message number. You can also use a message in a file by giving the file name using the -file or the -draftmessage options. If you want to send an existing draft without editing it further, you can supply the -use option in conjunction with the -noedit option. This will place you at the What now? prompt without invoking an editor. Specifies an alternative whatnow program. Nor- mally, comp invokes the default whatnow program. See whatnow(1) for a discussion of available options. You can specify your own alternative to the default program using the -whatnowproc program option. If you do specify your own program, you should not call it whatnow. You can suppress the whatnow program entirely by using the -nowhatnowproc option. However, as the program normally starts the ini- tial edit, the -nowhatnowproc option will prevent you from editing the message. The defaults for comp are: +foldername defaults to the current folder msg defaults to the current message -nodraftfolder -nouse DESCRIPTION
Use comp to create a new message for mailing. When you run comp, it provides a message template for you to fill in and invokes an editor so that you can complete the message. The comp command normally creates the new message in your draft folder, if you have one set up, or in the draft file if you do not have a draft folder set up. If you wish to use an existing message as the basis of your new draft message, you can use the msg or +folder argu- ments. The +folder argument takes the current message in the named folder as the basis of the new draft message. The msg argument takes the named message from your draft folder, or if you do not have a draft folder set up, from your current folder. In both cases, the mail system asks you what you want to do with the existing message. You cannot use the msg and +folder arguments together. A mail message consists of a mail header and the body of the message. The mail header contains all the information that determines who is going to receive the mail message. It can also give the recipients some information about the sender. The body of the message is the actual text of the message that you want to send. The header is separated from the body of the text by a blank line or by a line of dashes. The header must be separated from the body of the message in this way for the message to be identified properly when it is sent; see send(1). The standard message header looks like this: To: cc: Subject: -------- You can specify an alternative mail header by setting up a file called components in your Mail directory. This is used instead of the default mail header by comp. If you do not have a draft folder set up, comp creates your new draft in a file called draft in your Mail directory. This file must be empty before you can create a new draft, which means that you can only store one draft at a time. If it is not empty, the mail system will ask you what you want to do with the existing contents. The options are: Aborts comp, leaving the draft intact. Replaces the existing draft with the appropriate message form. Allows you to edit the existing draft. Displays the draft message. Refiles the existing draft message in the specified folder, and provides a new message form for you to complete. If you want to have more than one draft at a time, you can set up a draft folder in your keep as many unsent drafts as space allows, and still create new messages as you wish. To do this, make sure that the following line is in your Draft-folder: +drafts For more information on how to do this, see mh_profile(4). If you set up a draft folder, all draft messages are created in that folder. If you decide not to send the draft, by typing quit at the What now? prompt, the message is stored in the draft folder. You can then re-edit the message, or send it at a later date, by using the -use option to comp. PROFILE COMPONENTS
Path: To determine your Mail directory Draft-Folder: To find the default draft folder Editor: To override the default editor Msg-Protect: To set mode when creating a new message (draft) fileproc: Program to refile the message whatnowproc: Program to ask the "What now?" questions FILES
The default system template for draft messages. The user-supplied alternative to the default draft template. Your user profile. The draft file. SEE ALSO
dist(1), forw(1), prompter(1), repl(1), send(1), whatnow(1), mh_profile(4) comp(1)
All times are GMT -4. The time now is 01:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy