Sponsored Content
Top Forums Shell Programming and Scripting Saving files with file name as output Post 302951099 by jim mcnamara on Sunday 2nd of August 2015 10:34:12 AM
Old 08-02-2015
Let me understand here.


Hmm.

Code:
[ -d /spec ]  || mkdir /spec
find /*.wav | 
while read fname 
do
    xxx $fname  -o /spec/spec-${fname}-$(date -u +%Y%m%dt%H%M)  
done

I added the /spec thing to prevent littering up the / directory.
You should remove it if it is not needed.

Will this give the correct output?
This User Gave Thanks to jim mcnamara For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab keeps saving empty files of the job file.

Hey, MAILTO=cron@domain.ca */20 * * * * /usr/bin/wget http://list.domain.ca/admin/consume.php >/dev/nullthats what the crontab is setup todo, so basically every 20minutes it runs consume.php In my root directory, i'm getting files like this: consume.php consume.php1 consume.php2 i woke... (3 Replies)
Discussion started by: iarp
3 Replies

2. UNIX for Dummies Questions & Answers

saving command output to a variable

Hello, I have a shell script containing a command string in the following format: command1 | command2 | cut -c9-16 The output from this is a record number (using characters 9-16 of the original output string) e.g. ORD-1234 I wish to save this value to a variable for use in later commands... (4 Replies)
Discussion started by: philjo
4 Replies

3. UNIX for Dummies Questions & Answers

Assistance with combining, sorting and saving multi files into one new file

Good morning. I have a piece of code that is currently taking multiple files and using the CAT.exe command to combine into one file that is then sorted in reverse order based on the 3rd field of the file, then displayed on screen. I am trying to change this so that the files are being combined into... (4 Replies)
Discussion started by: jaacmmason
4 Replies

4. Shell Programming and Scripting

parsing txt file, saving graphics files

hi everyone, i am a newbie in shell programming. and i want to simply go through a text file that contains 3 "columns", split by ';' customerID ; link-to-contract ; save-as-filename so an example would simply look like this now i want to loop through every line, and save the file from... (3 Replies)
Discussion started by: Confidence
3 Replies

5. UNIX for Dummies Questions & Answers

Saving a temporary output within a script

Good morning everyone, i am looking to know how to save the output of a command and reuse it again within a script i already tired this one but it didn't work TEMPDIR=/dir1/dir2 My_command> $TEMPDIR/$TEMPFILE rm $TEMPDIR/$TEMPFILE* it keeps saying "cannot write to a... (15 Replies)
Discussion started by: Portabello
15 Replies

6. Shell Programming and Scripting

saving output from bash into a file

I am ssh to many servers to get some information... however sometimes the server is unreacheable and i am getting an error. I want to save that output to a file but I am not able to do so... I want to be able to save output of bash into a file.. so when I run this command on a script ssh... (5 Replies)
Discussion started by: eponcedeleonc
5 Replies

7. Shell Programming and Scripting

Need some Help for file filteration and saving the output in other directory using grep....plz ...

Hi all........ Plss do help me.......in a big trouble... :wall::wall::wall: I have 3 directories named as :1. /home/shuchi/source 2./home/shuchi/destination 3./home/shuchi/filter now the problem is /home/shuchi/source has say 2 files with extension .txt as given below : A.txt Code: ... (0 Replies)
Discussion started by: ektubbe
0 Replies

8. Shell Programming and Scripting

Need some Help for file filteration and saving the output in other directory

Hi all........ Plss do help me.......in a big trouble... :wall::wall::wall: I have 3 directories named as :1. /home/shuchi/source 2./home/shuchi/destination 3./home/shuchi/filter now the problem is /home/shuchi/source has say 2 files with extension .txt as given below : A.txt msisdn ... (5 Replies)
Discussion started by: ektubbe
5 Replies

9. Shell Programming and Scripting

Saving nohup output to a file other than nohup.out

Shell : bash OS : Oracle Linux 6.4 I want to save the ouput of a nohup command to file other than nohup.out . Below are my 3 attempts. For both Attempt1 and Attempt2 , the redirection logs the output correctly to the output file. But I get the error "ignoring input and redirecting stderr to... (7 Replies)
Discussion started by: kraljic
7 Replies

10. Shell Programming and Scripting

sed command is saving output as blank file

Hi, I am working on a script where I am adding adding colors to few of the info in the output. Now , after that is done , I see colour codes in log files which I don't want to see.:mad::mad::mad::mad: So , I tried using sed command in script as below which gives me o/p (new.log) as blank file... (7 Replies)
Discussion started by: Dream4649
7 Replies
umount(3)						     Library Functions Manual							 umount(3)

NAME
umount - Unmounts a file system LIBRARY
System V Compatibility Library (libsys5.a) SYNOPSIS
#include <sys/mount.h> int umount( char *spec ); PARAMETERS
spec Points to the pathname of the special file or file system to be unmounted. DESCRIPTION
The umount() function unmounts a previously-mounted file system contained on the block special file pointed to by the spec parameter. When the file system is unmounted, the directory mount point where the file system was mounted returns to its normal interpretation. The umount() function can only be invoked by the superuser. NOTES
Two umount() functions are supported by the Tru64 UNIX operating system: the BSD umount() and the System V umount(). The default umount() function is the BSD umount(). To use the version of umount() documented on this reference page, you must link with the libsys5 library before you link with libc. RETURN VALUE
The umount() function returns 0 (zero) if the file system was successfully unmounted. Otherwise, -1 is returned and errno is set to indi- cate the error. ERRORS
If the umount() function fails, errno may be set to one of the following values: [EPERM] The effective user ID of the calling process is not root. [ENOENT] The spec parameter points to a pathname that does not exist. [ENOTDIR] A component of the path prefix of spec is not a directory. [ENOTBLK] The device identified by spec is not a block-special device. [ENXIO] The device identified by spec does not exist. [EBUSY] A file on the device pointed to by the spec parameter is busy. [EINVAL] The device pointed to by the spec parameter is not mounted. RELATED INFORMATION
Commands: mount(8) delim off umount(3)
All times are GMT -4. The time now is 05:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy