Sponsored Content
Top Forums Shell Programming and Scripting copying and manipulating files Post 302564114 by elginmulizwa on Thursday 13th of October 2011 12:37:15 AM
Old 10-13-2011
Java copying and manipulating files

im copying alot of files this is a script im trying to modify but not sure how to make it copy files without an extension and then add a .txt to them
Code:
    abc=   #assuming the file does not have an end or extension
    foo='abc$'
    FROM=/user/share/doc
    TO=~/home/doc
    for grep $foo in $from do
    echo the files have no file extension
    cp -r $FROM $TO


Moderator's Comments:
Mod Comment Video tutorial on how to use code tags in The UNIX and Linux Forums.

Last edited by Franklin52; 10-13-2011 at 03:32 AM.. Reason: Please use code tags, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Manipulating two files

Hi Friends, I prefer to represent my problem with example. I have two files as below: file1.txt --------- abcd.....1234......XY abcd.....1235......XX abcd................. abcd...231236..1111YX abcd...241236..1112YY abcd...241237......YY abce.....1235......YY file2.txt ------- ... (4 Replies)
Discussion started by: rinku11
4 Replies

2. Shell Programming and Scripting

Can I make "touch" create executable files by manipulating umask?

I'm getting to grips with this concept of the umask. What I thought was, setting umask uga+rwx would result in creating files with all permissions for everyone. Seems not to be the case though. Read and write bits get set, but not the execute bit. Is there some gap in my understanding, or is... (2 Replies)
Discussion started by: tphyahoo
2 Replies

3. Shell Programming and Scripting

csh: manipulating text files - please help!

Hi All, I am trying to manipulate a text file in a csh script I am writing. I just started scripting a few months ago and have NO idea how to get this to work. My ultimate goal is to turn a text file that looks like this: 4 ep2d_diff_mddw_20_p2-MOD err 128 128 64 62 52611737 2 ... (3 Replies)
Discussion started by: Torinator
3 Replies

4. UNIX for Advanced & Expert Users

copying of files by userB, dir & files owned by userA

I am userB and have a dir /temp1 This dir is owned by me. How do I recursively copy files from another users's dir userA? I need to preserve the original user who created files, original group information, original create date, mod date etc. I tried cp -pr /home/userA/* . ... (2 Replies)
Discussion started by: Hangman2
2 Replies

5. UNIX for Dummies Questions & Answers

Manipulating files

Hi Guys, I'm really new to Unix and Linux and other scripting languages but recently I hv been really enthusiatic about learning more to help out on my work. So I have a file with 3 columns. A sample of it looks like looks like this : K2_537841 AAATCAGCCGCAACATTTGC ... (7 Replies)
Discussion started by: pawannoel
7 Replies

6. Shell Programming and Scripting

Copying Files

Hi All, I'm trying to list some files from my log directory and files are like this log.20110302_20.gz log.20110302_21.gz log.20110302_22.gz log.20110302_23.gz log.20110303_00.gz log.20110303_01.gz log.20110303_02.gz ............ log.20110311_22.gz log.20110311_23.gz... (2 Replies)
Discussion started by: thelakbe
2 Replies

7. Shell Programming and Scripting

reading from two files and manipulating the data

hi i have a file of the following format FILE1 5 937 8 1860 1850 1 683 2 1 129 2 2 5 938 8 1122 1123 1 20 520 4 1860 1851 1 5 939 8 1122 1124 1 20 521 4i have another file which... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies

8. Shell Programming and Scripting

Files copying - [ Listed files alone. ] - Shell script

Hi All, I am doing this for svn patch making. I got the list of files to make the patch. I have the list in a file with path of all the files. To Do From Directory : /myproject/MainDir To Directory : /myproject/data List of files need to copy is in the file: /myproject/filesList.txt ... (4 Replies)
Discussion started by: linuxadmin
4 Replies

9. Shell Programming and Scripting

Manipulating audio files server side

Hi All, I have next to zero knowledge on what I am about to ask so I will just ask it in plain English :) I am wondering how best to go about manipulating audio files server side. The manipulations required are join files one after the other, eg, audio1 + audio2 + audio3 + audio4 = audio5 ... (0 Replies)
Discussion started by: linuxgoat
0 Replies

10. Shell Programming and Scripting

Manipulating files

Not sure if the question posted in another forums can be moved by me.So posting the link here. https://www.unix.com/unix-advanced-expert-users/221425-shell-script-manipulate-files.html#post302795379 Need your help here. (1 Reply)
Discussion started by: vedanta
1 Replies
MEDIAINFO-GUI(1)						   User Commands						  MEDIAINFO-GUI(1)

NAME
MediaInfo - command line utility to display information about audio/video files MediaInfo-Gui - graphical utility to display information about audio/video files SYNOPSIS
mediainfo [-Options...] FileName1 [Filename2...] mediainfo --Inform=FMT FileName mediainfo-gui [-Options...] FileName1 [Filename2...] mediainfo-gui --Inform=FMT FileName DESCRIPTION
MediaInfo supplies technical and tag information about a video or audio file What information can I get from MediaInfo? - General: title, author, director, album, track number, date, duration... - Video: codec, aspect, fps, bitrate... - Audio: codec, sample rate, channels, language, bitrate... - Text: language of subtitle - Chapters: number of chapters, list of chapters What format does MediaInfo support? - Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2, MPEG-4, DVD (VOB)... - Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC... - Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF... - Subtitles: SRT, SSA, ASS, SAMI... What can I do with it? - Read many video and audio file formats - View information in different formats (text, sheet, tree, HTML...) - Customise these viewing formats - Export information as text, CSV, HTML... - Graphical Interface, Command Line, or library versions available OPTIONS
MediaInfo supports the following case-insensitive options: --Help, -h Display help and exit --Help-Inform Display help for --Inform option --Help-AnOption Display help for "AnOption" --Version Display MediaInfo version and exit --Full, -f Full information Display (all internal tags) --Output=HTML Full information Display with HTML tags --Output=XML Full information Display with XML tags --Inform=FMT Template defined information display. FMT is "[xxx;]Text", where xxx can be any one of General, Video, Audio, Text, Chapter, Image, or Menu. Text can be the template text, or a filename in the form of file:///path See --Info-Parameters for available parameters in the text. Parameters must be surrounded by "%". --Info-Parameters Display list of --Inform parameters --Language=raw Dislpay non-translated unique identifiers (internal text) --LogFile=LogFile Save the output in LogFile EXAMPLES
Display information about a video file $ mediainfo foo.mkv Display aspect ratio $ mediainfo --Inform="Video;%DisplayAspectRatio%" foo.mkv $ mediainfo --Inform="Video;file://Video.txt" foo.mkv Both forms are equivalent if Video.txt contains: %DisplayAspectRatio% Display aspect ration and audio format $ mediainfo --Inform="file://Text.txt foo.mkv If Text.txt contains: - "Video;%DisplayAspectRatio%" Then the display aspect ratio is printed out. - "Audio;%Format%" Then the audio format is printed out. AUTHOR
This manual page was written by Chow Loong Jin <hyperair@debian.org> for the Debian system (but may be used by others). Permissions is granted to copy, distribute, and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. On Debian systems, the full text of the GNU General Public License, Version 3 can be found in /usr/share/common-licenses/GPL-3. MediaInfo 0.7.52 2012-06-03 MEDIAINFO-GUI(1)
All times are GMT -4. The time now is 06:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy