tagged [shell]
How to get the contents of a webpage in a shell variable?
How to get the contents of a webpage in a shell variable? In Linux how can I fetch an URL and get its contents in a variable in shell script?
Running windows shell commands with python
Running windows shell commands with python How can we interact with OS shell using Python ? I want to run windows cmd commands via python. How can it be achieved ?
- Modified
- 15 Feb at 11:29
I get "dquote>" as a result of executing a program in linux shell
I get "dquote>" as a result of executing a program in linux shell When I execute a script in a Linux shell, I get this output: What does this mean?
What does "-ne" mean in bash?
What does "-ne" mean in bash? What does the command "-ne" mean in a bash script? For instance, what does the following line from a bash script do?
How do I read user input into a variable in Bash?
How do I read user input into a variable in Bash? How do I read user input into a variable in Bash? ``` fullname="" # Now, read user input into the variable `fullname`. ```
Associative arrays in shell scripts
Associative arrays in shell scripts We require a script that simulates associative arrays or map-like data structure for shell scripting. Can anyone let's know how it is done?
- Modified
- 23 Jun at 19:19
Execute shell command from within a MySQL client?
Execute shell command from within a MySQL client? In oracle database, command "host" can be used to run bash command from database command window. Is there a equivalent command as "host" in mySql?
Shell: How to call one shell script from another shell script?
Shell: How to call one shell script from another shell script? I have two shell scripts, `a.sh` and `b.sh`. How can I call `b.sh` from within the shell script `a.sh`?
Select random lines from a file
Select random lines from a file In a Bash script, I want to pick out N random lines from input file and output to another file. How can this be done?
- Modified
- 11 Apr at 05:24
How do I execute a program or call a system command?
How do I execute a program or call a system command? How do I call an external command within Python as if I had typed it in a shell or command prompt?
- Modified
- 15 Dec at 01:6
How can I debug a Bash script?
How can I debug a Bash script? Is there a way to debug a Bash script? E.g., something that prints a sort of an execution log, like "calling line 1", "calling line 2", etc.
How to view files in binary from bash?
How to view files in binary from bash? I would like to view the contents of a file in the current directory, but in binary from the command line. How can I achieve this?
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