tagged [shell]
How do you normalize a file path in Bash?
How do you normalize a file path in Bash? I want to transform `/foo/bar/..` to `/foo` Is there a bash command which does this? --- Edit: in my practical case, the directory does exist.
Execute a file with arguments in Python shell
Execute a file with arguments in Python shell I would like to run a command in Python Shell to execute a file with an argument. For example: `execfile("abc.py")` but how to add 2 arguments?
Escape double quote in grep
Escape double quote in grep I wanted to do grep for keywords with double quotes inside. To give a simple example: That does not match. How can I fix it?
How do I assign ls to an array in Linux Bash?
How do I assign ls to an array in Linux Bash? I have three directories: `ww` `ee` `qq`. I want them in an array and then print the array.
Using sed, how do you print the first 'N' characters of a line?
Using sed, how do you print the first 'N' characters of a line? Using `sed` what is an one liner to print the first ? I am doing the following:
How to detect running app using ADB command
How to detect running app using ADB command I have one Android Device running Jelly Bean OS. Is there any way to detect the process is running or not using `ADB` command if i know the ?
How to run a python script from IDLE interactive shell?
How to run a python script from IDLE interactive shell? How do I run a python script from within the IDLE interactive shell? The following throws an error:
- Modified
- 16 Feb at 16:46
How to create a database from shell command?
How to create a database from shell command? I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hint...
- Modified
- 1 Oct at 12:26
Convert absolute path into relative path given a current directory using Bash
Convert absolute path into relative path given a current directory using Bash Example: How do I create the magic (hopefully not too complicated code...)?
- Modified
- 27 Sep at 21:8