Skip to main content

I have a CSV file whitwith two columns and this information:

Column1 | Column2
USA     |  Chicago
USA     | DalasDallas
FR      | France
AUS     | Sydney
AUS     | Perth

And iI have to move all the files whit thewhere Column1 equal at equals AUS exemple. For example,

mv Sydney* /usr/local/sbin
mv Perth* /usr/local/sbin

It'sIs it possible to do it whitthis with a shell script without using hardcodehardcoding?

I have a CSV file whit two columns and this information

Column1 | Column2
USA     |  Chicago
USA     | Dalas
FR      | France
AUS     | Sydney
AUS     | Perth

And i have to move all the files whit the Column1 equal at AUS exemple

mv Sydney* /usr/local/sbin
mv Perth* /usr/local/sbin

It's possible to do it whit a shell script without using hardcode?

I have a CSV file with two columns and this information:

Column1 | Column2
USA     | Chicago
USA     | Dallas
FR      | France
AUS     | Sydney
AUS     | Perth

I have to move all the files where Column1 equals AUS. For example,

mv Sydney* /usr/local/sbin
mv Perth* /usr/local/sbin

Is it possible to do this with a shell script without hardcoding?

Markup
Source Link
Kusalananda
  • 355.9k
  • 42
  • 735
  • 1.1k

I have a CSV file whit two columns and this information
Column1 | Column2
USA | Chicago
USA | Dalas
FR | France
AUS | Sydney
AUS | Perth

Column1 | Column2
USA     |  Chicago
USA     | Dalas
FR      | France
AUS     | Sydney
AUS     | Perth

And i have to move all the files whit the Column1Column1 equal at AUS exemple mv Sydney* /usr/local/sbinAUS mv Perth* /usr/local/sbinexemple

mv Sydney* /usr/local/sbin
mv Perth* /usr/local/sbin

It's possible to do it whit a shell script without using hardcode?

I have a CSV file whit two columns and this information
Column1 | Column2
USA | Chicago
USA | Dalas
FR | France
AUS | Sydney
AUS | Perth

And i have to move all the files whit the Column1 equal at AUS exemple mv Sydney* /usr/local/sbin mv Perth* /usr/local/sbin

It's possible to do it whit a shell script without using hardcode?

I have a CSV file whit two columns and this information

Column1 | Column2
USA     |  Chicago
USA     | Dalas
FR      | France
AUS     | Sydney
AUS     | Perth

And i have to move all the files whit the Column1 equal at AUS exemple

mv Sydney* /usr/local/sbin
mv Perth* /usr/local/sbin

It's possible to do it whit a shell script without using hardcode?

Source Link

Get data form CSV to move a file

I have a CSV file whit two columns and this information
Column1 | Column2
USA | Chicago
USA | Dalas
FR | France
AUS | Sydney
AUS | Perth

And i have to move all the files whit the Column1 equal at AUS exemple mv Sydney* /usr/local/sbin mv Perth* /usr/local/sbin

It's possible to do it whit a shell script without using hardcode?