• This topic has 42 replies, 17 voices, and was last updated 2 years ago by poly.
Viewing 3 posts - 41 through 43 (of 43 total)
  • Quick help with a basic linux command
  • haloric
    Free Member

    Apologies to all but the pedant in me just had a panic attack.

    *BBC*.txt
    * means “anything”. So it’s listing [anything]BBC[anything].txt here.

    . is also a wildcard. * means any number of [anything] and . means a single instance of [anything] so you may as well do away with it in the above and just use *BBC*txt

    Well – if pedantry is your thing, I’ve been biting my knuckles all through this.

    Yes and No. ‘.’ is a regex character – but not in bash command lines.

    So *.txt will be only files ending in .txt
    *txt is anything ending in txt, like bbcwasheretxt

    tonyd
    Full Member

    Every day is a school day!

    poly
    Free Member

    My idea was instead of trying to read the folder a programing language – just run an os command from my program to do the heavy lifting and just read in the names of the CSV files to import – from this new temp txt file.

    I assume if my program needs to run on a Windows machine, I will just need to write the equivalent os command in DOS/powershell?

    Yes I’m out of my depth a bit. 99.99% of any coding I do is read from dB, manipulate, write to dB. Basic stuff.

    Not sure which language you are using – but Python would make that trivial and could easily handle switching between OS if you are careful with the commands. Other languages may not be quite so nice for this sort of thing. I find python very useful for exactly the sort of task you are thinking about, as its much more readable when in two years time someone asks you to change something / it breaks.

Viewing 3 posts - 41 through 43 (of 43 total)

The topic ‘Quick help with a basic linux command’ is closed to new replies.