Sponsored Content
Top Forums Shell Programming and Scripting Move files from Space Folder to other folder Post 302914136 by kannansoft1985 on Friday 22nd of August 2014 05:58:57 AM
Old 08-22-2014
HP Move files from Space Folder to other folder

I want to move a folder with spaces from one folder to another.

I have two folders like this,
1).RT_032-222 -4444-01/ 2). RT_032-555 -7777-01/

I want to move files from 2 to 1 through shell script.Here I want to assign this like a user defined variable like as Source branch code,Source batch code,Destination branch code and Destination batch code.

EX:

Code:
echo " Enter the source branch code : "
read bc          ## input  like as 555
echo " Enter the souce batch code: "
read bcd        ## input like as 7777
echo " Enter the Destination branch code:"
read dbc       ##  input like as 222
echo " Enter the Destination batch code : "
read dbcd     ## input like as 4444
 mv /imagedata/RT_032-$dbc -$dbcd-01  /imagedata/RT_032-$bc -$bcd-01

###here the last line does not work properly,because here the space occupied there between $dbc and -$dbcd and same as $bc and -$bcd.
like that,
555 and -7777-01/ same as 222 and -4444

please solve this problem by using a user defined variable.

Last edited by Scrutinizer; 08-22-2014 at 08:55 AM.. Reason: code tags, change underline to icode tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

move files from folder thats are not empty

Hi, I would like to write a shell script that moves files from one folder to another without retrieving the error 'can not find file or folder' when the folder is empty. Any ideas, Thx in advance, Steven. (8 Replies)
Discussion started by: Steven
8 Replies

2. Shell Programming and Scripting

Move the file from one folder to another folder

Hi, I have a requirement to move a file from one folder(a) to another folder(b) only when folder (b) have a write permission. Folder permission is 755 If the permission is otherthan 755 we need to come out of the loop I will appreciate your help Thanks Soll (1 Reply)
Discussion started by: sollins
1 Replies

3. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

4. Shell Programming and Scripting

move files to some folder

Hello folk, I want to move some *.jpg and *.JPG to some folder but i want move from current path not from subdirectories, wants to move 200 days old file. it will go in /dir/aa/target/*.jpg|*.JPG but not go inside /dir/aa/target/other-directories, Plese help (2 Replies)
Discussion started by: learnbash
2 Replies

5. UNIX and Linux Applications

Move Files From One Folder To Another In UNIX

There are around 13 files in folder1.I need to move these files to another folder folder2,one file at a time, after checking whether a file exists in another folder folder3. If a file exists in folder3, we should not move files from folder1 to folder2. If there are no files in folder3, we need... (1 Reply)
Discussion started by: Jassz
1 Replies

6. Shell Programming and Scripting

Move only files to a folder

I want to move all the files inside a directory to another directory which is inside that directory. Please help. Note: I want to move only the files. Note the folders. Thanks in advance. (4 Replies)
Discussion started by: brnl_basu
4 Replies

7. Shell Programming and Scripting

want to move set of file from one folder to another folder

Hi all, let me explain my requirments i am having 5 folder with different name for eg) abc , cdf , efd, rtg, ead each 5 folders contain 15 files i want to move 10 files to some other folder, remain 5 files should be there in the same folder. give me some suggestion on this. (6 Replies)
Discussion started by: natraj005
6 Replies

8. Solaris

Move files to another folder base on DU

Hi, I want to move files like *.txt to another filesystem on the same server only when the disk usage reaches 80% or more. But need to keep the latest 5 files. After that delete from the original. How to proceed? Please help Gav... (5 Replies)
Discussion started by: Gavisht
5 Replies

9. Shell Programming and Scripting

Script to move one folder to multiple folder...

Hi All, I have to requirement to write a shell script to move file from one folder (A) to another five folder (B,C,D,E,F) and destination folder should be blank. In not blank just skip. This script will run as a scheduler every 2 minutes. It will check number of files in folder A and move 1 to... (9 Replies)
Discussion started by: peekuabc
9 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
flow-print(1)						      General Commands Manual						     flow-print(1)

NAME
flow-print -- Display flows in formatted ASCII. SYNOPSIS
flow-print [-hlnpw] [-d debug_level] [-f format] DESCRIPTION
The flow-print utility will display flow data in ASCII using pre-defined formats selectable with -f. Some of the less descriptive column headers are defined below Header Description ------------------------------- Sif Source Interface ifIndex. DiF Destination Interface ifIndex. Pr Protocol. P Protocol. SrcP Source Port. DstP Destination Port. Pkts Packets. Octets Octets (Bytes). Active Time in ms the flow was active. B/Pk Bytes per Packet. Ts Type of Service. Fl Flags, for TCP the cumulative or of the TCP control bits. srcAS Source AS. dstAS Destination AS. Start Start time of the flow. End End time of the flow. router_sc V7 IP address of router producing shorcuts. peer_nexthop V6 IP address of peer next hop IP address. encap i/o Version 6 only. Encapsulation size in/out duration Time in ms the flow was active. input Input Interface ifIndex. output Output Interface ifIndex. flows Number of aggregated flows. mTos V8.x ToS of pkts that exceeded the contract. xpackets V8.x Packets that exceed the contract. OPTIONS
-d debug_level Enable debugging. -f format Select format. The default is appropriate for the export type of the flow data. Available formats are: 0 1 line, interfaces, hex ports 1 2 line (includes timing and flags) 2 2 line candidate TCP syn attack flows 3 1 line, no interfaces, decimal ports 4 1 line with AS number 5 1 line, 132 column 6 show ip accounting emulation 7 1 line, 132 column +router_id 8 1 line, 132 column +encapsulation 9 1 line with tag values 10 AS aggregation 11 Protocol Port aggregation 12 Source Prefix aggregation 13 Destination Prefix aggregation 14 Prefix aggregation 15 Destination aggregation (Catalyst) 16 Source Destination aggregation (Catalyst) 17 Full Flow (Catalyst) 18 ToS AS Aggregation 19 ToS Proto Port aggregation 20 ToS Source Prefix aggregation 21 ToS Destination Prefix aggregation 22 ToS Prefix Aggregation 23 ToS Prefix Port aggregation 24 Full (Catalyst) -h Display help. -l Unbuffer output. -n Use symbolic names where appropriate. -p Display header information. -w Wide output. EXAMPLES
Display flows in flowfile flow-print < flowfile FILES
Configuration files: Symbols - /etc/flow-tools/sym/*. BUGS
None known. AUTHOR
Mark Fullmer maf@splintered.net SEE ALSO
flow-tools(1) flow-print(1)
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy