[CentOS] bash off topic
Jerry Geis
jerry.geis at gmail.comThu May 16 16:57:43 UTC 2019
- Previous message: [CentOS] CentOS-announce Digest, Vol 171, Issue 5
- Next message: [CentOS] bash off topic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a simple bash script it will take arguments from a file that has quotes. my file arg.txt would be this -lt "*.txt" my script file would be LS_ARG=`cat arg.txt` ls $LS_ARG it does not run properly: sh -x ./arg.sh ++ cat arg.txt + LS_ARG='-lt "*.txt"' + ls -lt '"*.txt"' ls: cannot access "*.txt": No such file or directory How do I resolve that ? If the quotes are not in my file it all works fine. I think its because it looks like the extra single quotes it puts around the "*.txt" - or - '"*.txt"' - how do I do this ? This is just a short example of my larger need. Thanks, Jerry
- Previous message: [CentOS] CentOS-announce Digest, Vol 171, Issue 5
- Next message: [CentOS] bash off topic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list