File Extension Missing in file-$var.csv


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers File Extension Missing in file-$var.csv
# 1  
Old 09-16-2015
File Extension Missing in file-$var.csv

I'm afraid this is a silly question but I can't figure it out.

I have a script like so...

Code:
echo "Enter DRDL Signature Version Number"
read DRDL_Number
mv signature_output.csv SERVICE_OBJECTS_S-$DRDL_Number.csv

The resultant filename does not contain the .csv as follows.
Code:
SERVICE_OBJECTS_S-5

However, when I had it like the following it worked fine:
Code:
DY=`date +"%Y%m%d%H%M%S"`
mv signature_output.csv SERVICE_OBJECTS_$DY.csv

What am I doing wrong?


Thanks
Cludgie
# 2  
Old 09-16-2015
I can't reproduce that behaviour. What OS / shell are you using?
# 3  
Old 09-16-2015
I'm connecting via SSH to an Ubuntu Server 14.04 LTS and bash.
# 4  
Old 09-16-2015
Have you tried:
Code:
mv signature_output.csv SERVICE_OBJECTS_S_$DRDL_Number.csv

I remembered seeing something of the sort (-$ in filename not working..) but cant remember where...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Systemd errors of missing file “No such file or directory” inspite of file being present

The contents of my service file srvtemplate-data-i4-s1.conf is Description=test service for users After=network.target local-fs.target Type=forking RemainAfterExit=no PIDFile=/data/i4/srvt.pid LimitCORE=infinity EnvironmentFile=%I . . . WantedBy=multi-user.target (0 Replies)
Discussion started by: rupeshkp728
0 Replies

2. Shell Programming and Scripting

Save output of updated csv file as csv file itself, part 2

Hi, I have another problem. I want to sort another csv file by the first field. result.csv SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw /home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies

3. Shell Programming and Scripting

Save output of updated csv file as csv file itself

Hi, all I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file. test.csv SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0739.JPG,2015:02:17 11:32:21 /home/intannf/foto/IMG_0749.JPG,2015:02:17 11:37:28... (10 Replies)
Discussion started by: refrain
10 Replies

4. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

5. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

6. Shell Programming and Scripting

Fix CSV file with column missing quotes

I have a CSV file that is missing quotes around a column that contains text with commas. Example: Column1, Column2, Column3, Column4, Column5, Column6 Data1, Data2, Data3, Data, 4, Data5, Data6 Data1, Data3, Data3, Data, text, 4, Data5, Data6 I think the easiest way for me to fix this is to... (2 Replies)
Discussion started by: EmptyH
2 Replies

7. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

8. AIX

/var/adm/messages file is missing

Hi, The server is p570 with AIX@5300-10... The messages file is missing...how do I get it back and start logging the messages?? Can I just create the file again? (2 Replies)
Discussion started by: gkr747
2 Replies

9. UNIX and Linux Applications

RandR extension missing

Help! I have a linux box wth vncserver setup in it. Now, the problem is when I'm connected to the linux box via vnc session executing the command in terminal xrandr gives me the following: $ xrandr Xlib: extension "RANDR" missing on display ":1.0". RandR extension missing plus the geometry... (1 Reply)
Discussion started by: etcpasswd
1 Replies
Login or Register to Ask a Question