moin moin, We're in person this Thursday for talk on command line ordering.
Starts 19:00 AZ ( UTC - 7 ) https://floss.social/@[email protected]/115852611102587372 ---- Abstract Order matters when the shell executes a command, but isn't strictly left to right. Redirects, functions, sub-shells, {brace,tilde,parameter,variable,arithmetic} expansion, pipes, globbing, regular expressions, command substitution and more. What order does bash evaluate the different parts of the command line and what effect does that ordering have on the command? Which portions of the command are evaluated by the shell and which aren't? The presentation will use command line examples to illustrate evaluation order for the various parts of a command. For example: grep foo file.txt >file.txt That command results in file.txt being empty regardless of what the previous contents were ( provided file permissions allow the user to write to file.txt ). The reason is that the shell truncates file.txt before even starting up grep, so grep is actually searching a newly truncated and empty file. echo -n $( echo foo >>file.txt ) >file.txt Again there is an empty file at the end even though foo is added to the file.txt during the command. In this case, the command subtitution and its associated output redirection runs and completes before the outer shell and its redirection. As a result, file.txt gets a line of input, then is truncated. ---- Please be early to ease getting everyone to 3rd floor Location: 1702 E Highland, Phoenix 85016 in 3rd floor cafe Our new location is at the 51 and Highland ( approx 16th St and Camelback ). Park North of Highland in the Make A Wish lot. As reference points, this is near Town and Country and the back side of the shopping center with Duck and Decanter, somewhat across the street from Harvey Wineberger. When driving from the South, the parking lot is on the North side of Highland when turning left off the 51. If coming from 16th St it's behind the QT that's on the corner with Highland. There will be a door bell button mounted on the frame near the doors, but it is not guaranteed some one will be available to escort you once the meeting starts. Light food and drinks are permitted but you will need to clean up after yourself. FLOSS Stammtisch is a week from Tuesday, the 20th, in person at Boulders on Southern in Mesa. ciao, der.hans -- # https://www.SpiralArray.com https://www.PhxLinux.org # "Dinosaurs return. Want their oil back." -- David Brin --------------------------------------------------- PLUG-discuss mailing list: [email protected] To subscribe, unsubscribe, or to change your mail settings: https://lists.phxlinux.org/mailman/listinfo/plug-discuss
