Sponsored Content
Full Discussion: Mv or cp with a . (dot)?
Top Forums Shell Programming and Scripting Mv or cp with a . (dot)? Post 303008367 by scribling on Thursday 30th of November 2017 04:48:48 PM
Old 11-30-2017
I figured it out. It may be convoluted but it works.

Code:
c=$(cd ../../bla/bla ; find . -name *.xyz) # Set variable c to filename (./filename.xyz)
c=$(c:3:23) # Remove "./" from c variable's filename
c=.$(c:0:26) # Add a "." to the variable filename

cp ../..bla/bla/*.zyz ./$c # Copy the file and rename it with c variable's name

The reason I need to do it this way is because I need the filename to retain it's original name but still add the . as a prefix.

---------- Post updated at 01:48 PM ---------- Previous update was at 01:43 PM ----------

The only reason I'm naming the files with a . is under mac OSX .files are invisible to the average user. I'm working at a place and the mgt here gets all pissy if they see a file somewhere they don't expect it to be, but for things to load automatically they need to be in a certain place ... So, I'm copying the files with the . prefix so I don't have to listen to, "Why is this here?"

Come to think of it I don't know why they ask that question. They don't care why they're there and only want me to delete them regardless of the reason.
Moderator's Comments:
Mod Comment Please use CODE tags when displaying sample input, sample output, and code segments.

Last edited by Don Cragun; 11-30-2017 at 08:36 PM.. Reason: Add CODE tags.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

dot files

Hi, everyone. I'm now using rsync command, and please tell me what is the wildcard for below looks like. I want to chose dotfiles, such as .ipod .apple but i don't want to chose . and .. ------------------ .* doesn't work, of course. Thanks, Euler04 (2 Replies)
Discussion started by: Euler04
2 Replies

2. Shell Programming and Scripting

splitting on dot in perl

I am trying to split input that looks like ,2005-09-12 01:45:00.000000,2005-09-12 01:48:18.000000, I want to split on the dot . What I am using is ($ev_time,$rol)=split(/\./),$inputfile; This does not recognize the dot as what I want to split on. (2 Replies)
Discussion started by: reggiej
2 Replies

3. Shell Programming and Scripting

Replacing dot for comma

I wanted to change 34.66 to 34,66. I tried the command: sed 's/./,/' $NUM Where $NUM is a variable with 34.66 value. The output is ,4.66 (2 Replies)
Discussion started by: bdalmeida
2 Replies

4. UNIX for Dummies Questions & Answers

variable name with dot(.)

Hi, Is it possible to declare variable with name having dot(.) in it ? something like gs.test='HELLO' Thanks in advance :) (1 Reply)
Discussion started by: gopalss
1 Replies

5. Shell Programming and Scripting

How to type a dot(.) instead of character?

Hi, I want to connect a Oracle databse through unix shell script. When I will execute a shell script it will ask for user name and password to connect the databsae. At the time of entering the password field value, it willl display the characters like star(*), dot(.) instead of exact... (2 Replies)
Discussion started by: rajesh08
2 Replies

6. Shell Programming and Scripting

Greping numbers with dot in it

Hi, I wanted to create a script what would take two numbers out of two files and add them together, but I got stuck with greping numbers what have a dot in it. So far I have grepped the two lines what include the numbers I need (from both files) to a third file and from that file I try to... (7 Replies)
Discussion started by: mario8eren
7 Replies

7. Shell Programming and Scripting

removing DOT by using perl

Hi Friends, I have a variable which has a number (e.g. 12.1234). I want to remove "." (dot) from that number i.e. 121234 I want to do this using perl. Can you please guide me Thank you Anushree (2 Replies)
Discussion started by: anushree.a
2 Replies

8. Shell Programming and Scripting

How to Removing a dot from a file name?

I need a script that will allow me to rename all of my files in subdir /FilesIn as follows: From kumc_835_111200.RMT.dat to kumc_835_111200RMT.dat kumc_835_111200.KMR.dat to kumc_835_111200KMR.dat .................etc How do I do that whithout doing a sed ... (10 Replies)
Discussion started by: mrn6430
10 Replies

9. Shell Programming and Scripting

List the file with a dot

I am on hp-ux and not able to catch the file with dot using a wild card. $ touch .test $ ls -l .test -rw-r--r-- 1 oracle dba 0 Mar 21 05:20 .test $ ls -l *test *test not found $ ls -la *test *test not found Why i am not able to list the file startign with .... (7 Replies)
Discussion started by: bang_dba
7 Replies
COQ(1)							      General Commands Manual							    COQ(1)

NAME
coqtop - The Coq Proof Assistant toplevel system SYNOPSIS
coqtop [ options ] DESCRIPTION
coqtop is the toplevel system of Coq, for interactive use. It reads phrases on the standard input, and prints results on the standard out- put. For batch-oriented use of Coq, see coqc(1). OPTIONS
-h, --help Help. Will give you the complete list of options accepted by coqtop. -I dir, --include dir add directory dir in the include path -R dir coqdir recursively map physical dir to logical coqdir -top coqdir set the toplevel name to be coqdir instead of Top -inputstate filename, -is filename read state from file filename.coq -nois start with an empty initial state -outputstatefilename write state in file filename.coq -load-ml-object filename load ML object file filenname -load-ml-source filename load ML file filename -load-vernac-source filename, -l filename load Coq file filename.v (Load filename.) -load-vernac-source-verbose filename, -lv filename load verbosely Coq file filename.v (Load Verbose filename.) -load-vernac-object filename load Coq object file filename.vo -require filename load Coq object file filename.vo and import it (Require Import filename.) -compile filename compile Coq file filename.v (implies -batch ) -compile-verbose filename verbosely compile Coq file filename.v (implies -batch ) -opt run the native-code version of Coq -byte run the bytecode version of Coq -where print Coq's standard library location and exit -v print Coq version and exit -q skip loading of rcfile -init-file filename set the rcfile to filename -user uid use the rcfile of user uid -batch batch mode (exits just after arguments parsing) -boot boot mode (implies -q and -batch ) -emacs tells Coq it is executed under Emacs -dump-glob filename dump globalizations in file f (to be used by coqdoc(1) ) -with-geoproof (yes|no) to (de)activate special functions for Geoproof within Coqide (default is yes ) -impredicative-set set sort Set impredicative -dont-load-proofs don't load opaque proofs in memory -xml export XML files either to the hierarchy rooted in the directory $COQ_XML_LIBRARY_ROOT (if set) or to stdout (if unset) -quality improve the legibility of the proof terms produced by some tactics SEE ALSO
coqc(1), coq-tex(1), coqdep(1). The Coq Reference Manual. The Coq web site: http://coq.inria.fr October 11, 2006 COQ(1)
All times are GMT -4. The time now is 06:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy