I have the following commands.
cd import zcat urls1.sql.gz | mysql -u root -p urls cd /var/www/project1/ nano 1.php
As of now i'm executing it one by one.
Is there a way to combine those commands in one line?
|show 2 more comments|
Yes, separate with a semi-colon like so:
Most lanugauges/shells use the semi-colon to signify the end of a command and to start new while evaluating from left to right.
Or as @RobieBasak recommends, use && instead of ; to guard against coding accidents.