Skip to main content

All Questions

Tagged with
0 votes
1 answer
42 views

How to open line in $EDITOR while in python shell?

As a somewhat new user, I recently discovered the trick of opening the current terminal line in $EDITOR, using the hotkey C-x C-e. This has changed my life, and has made writing loops and such much ...
supersquires's user avatar
0 votes
0 answers
18 views

Does Nautilius the file manager customizer allow one to right click and pass into a python function the file right clicked as argument without error?

I am working on creating a way to right click on an .eml file, right click, and have python pull two pieces of data from it and paste them into a new xlsx file and auto open the xlsx file. I would try ...
Coo's user avatar
  • 101
0 votes
2 answers
619 views

Run shellcode as root in a buffer overflow attack?

I'm trying to exploit the following code: #include <stdio.h> #include <string.h> int main(int argc, char** argv){ char buffer[100]; strcpy(buffer, argv[1]); return 0; } with ...
r3k0j's user avatar
  • 15
0 votes
0 answers
206 views

Write output of multiple python scripts to single file

I used to have only one Python script, the output of which would be directed to a log file. It works like this: I have it in autostart, using crontab @reboot /bin/sleep 30; sudo /usr/bin/python3 -u /...
Dahlin's user avatar
  • 1
1 vote
2 answers
806 views

How to start a screen with crontab

sudo Crontab -e 15 0 * * 1-5 /usr/bin/screen -S wake_up -d -m /home/pi/auto/wake_up.py But at 00:15 there is no screen started... This command: (worked in terminal) screen -S wake_up -d -m /home/pi/...
JOC0N's user avatar
  • 13
0 votes
1 answer
1k views

Shell script that prompts user for arguments and inserts them as parameters into a python script

I am trying to write a shell script that prompts the user for 3 case-sensitive arguments username password url and then take those parameters and calls a python script i.e.: "python streamcount....
Nick O'Neil's user avatar
1 vote
0 answers
307 views

progress bar for general non-looping script, or using multiple processes to write to stdout

How do I make a spinning wheel or progress bar that measures the progress of a very general script and I don't need or want to run it over anything looping or iterable? It doesn't need to be anywhere ...
user19377190's user avatar
5 votes
5 answers
782 views

How can I replace multiple substrings from multiple lines in a file matching a pattern from a different file?

I have a file that contains multiple IP addresses and hostnames, and another file that contains some folders with many IP addresses per line. ip_hostname.txt host1 10.1.1.1 host2 10.2.2.2 host3 10.3.3....
Outsider's user avatar
-1 votes
1 answer
2k views

Bulk replace multiple variables in multiple files at once

Example: I have 40 different variables like $VAR in 100 .txt files which are located in /home/user/EXAMPLE/. How do I replace all variables in the 100 files? To tell the system what the variables are ...
xorghelpneed's user avatar
1 vote
1 answer
145 views

Creating a file based on output from a find -exec

I'm writing a shell script to batch validate (w3c validator) a load of HTML files. I'm using https://github.com/mozilla/html5-lint which provides a python script to do the actual validation work. The ...
steve's user avatar
  • 133
0 votes
4 answers
2k views

Using two variables to form a single text file

I am trying to create a text file with below content user name is ${name} and his mobile number is ${number} I have 10 users and 10 mobile numbers as well. User names are saved in user.txt and the ...
Raj R's user avatar
  • 3
0 votes
2 answers
2k views

API call for JSON to variable using SHELL or Python

I have an API access to a url that looks a little like this: curl https://api_url.com/device_groups/ -u api_key: Which outputs in JSON: { "data":[ { "type":"...
th3joker's user avatar
0 votes
0 answers
23 views

My variable seems to change when passed into a CLI [duplicate]

I am attempting to use a java based program, CRFVoter, for text mining. I called and executed the script as specified. [user]$ java -jar CRFVoter.jar usage: CRFVoter GPRO Command Line Tool for ...
Alex Plastow's user avatar
0 votes
3 answers
801 views

how to print file name and total number of fasta sequences?

I have a fasta file namely test.fasta, pas.fasta, cel.fasta as shown below test.fasta >tile ATGTC >259 TGAT pas.fasta >ta ATGCT cel.fasta >787 TGTAG >yog TGTAT >In NNTAG I need to ...
Kumar's user avatar
  • 129
5 votes
4 answers
330 views

Incrementally Swap Lines Between Two Regex Patterns in a File

I'm trying to do some text processing on a file using a bash script. The goal is to take all of the lines starting with "field:" indented under an 'attribute:' label and swap them with the ...
marshallnw18's user avatar

15 30 50 per page
1
2 3 4 5
10