Skip to content
Advertisement

Tag: command-line

edit-and-execute-command bash with sublime text

In a bash terminal session, I notice that the edit-and-execute-command C-xC-e does not work with Sublime Text 3. I’ve set EDITOR=subl, but when I try to edit a command line from bash, sublime-text opens an empty window. Do I miss something ? Answer You should export the EDITOR as: as: To use Sublime Text as the editor for many commands

CHange php 5.4 to 5.5 on Hostgator

Currently on composer install I get the error need 5.5.9 but using 5.4 but on Hostgator cpanal it’s set as 5.5 On php -v I get On php –ini I get When going into /opt/ There is a php54, php55 and php56 How do I change my version to 5.5 I saw the following example on this link But when

CUPS printing remote(http://) files from command line

I am trying to create a custom script to control my CANON SELPHY PRINTER form the command-line. lp -d Canon_CP900 -o media=”CP_C_size” /Users/sangyookim/Desktop/selphy.jpg I have the tested the above code and it’s working perfectly as I intend it to. But I have stumbled upon a problem. When I replace the /Users/sangyookim/Desktop/selphy.jpg or filname to a web link such as the

How do I write this in a batch file

I am trying to convert a shell script into a batch file but I am stuck at this place. I am not quite sure how to convert this line into my batch file. I tried but I am not sure if I am right! Answer You can’t do command chaining like this in Batch. If I see that correctly, you

Can’t run PHP exec() on command line

Hoping someone can help me out here. Trying to run any command using exec() returns 126 and displays the same error message. I’ve narrowed it down to this pretty minimal test case. SELinux and PHP safe mode are not enabled permissions are fine on /, /bin/, and /bin/ls asterisk is a system user created with this command: adduser -d /var/lib/asterisk

grep usage for date in a text file

I have some data in a text file like below: Now i want to fetch CPU Usage/Timestamp pair at a time like below: And, Memory Usage/Timestamp pair at a time like below: I tried grep -i “CPU Usage” testFile.txt | grep -i “Timestamp”, but it fetched the complete data irrespective of CPU Usage/Memery Usage. How can i do this so

Advertisement