I’ve been trying to create the directory “a” inside all the subdirectories of “example”. What I tried is the following: But it doesn’t take the ‘*’ as a wildcard, returning mkdir: can not create «example/*/a» directory: It doesn’t exist file or directory Note that I have too much subdirectories in example, so I can’t do it by creating a list.
Tag: shell
Why do I get this bash error? “export: `/home/atul/Public/Android’: not a valid identifier.”
I did this from the ~ directory. I typed this command sudo gedit .bashrc then I appended these lines to the file and saved it. Now when I open the terminal I get the following error: Its good that I have fish installed else I wouldn’t have been able to use the terminal. Please help me solve this error. Answer
How does the command ‘echo “6” > /proc/sys/kernel/printk’ work?
Please see an example in How can I show printk() message in console?, If the /proc/sys/kernel/prink was a normal file, the file would have changed to just “6”, a single number. But I know the proc file system is a file system in ram and I guess it works different. In what mechanism did the file changed that way? And
How can I change my shell every time I log in to bash by editing .cshrc file? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Find and copy specific files by date
I’ve been trying to get a script working to backup some files from one machine to another but have been running into an issue. Basically what I want to do is copy two files, one .log and one (or more) .dmp. Their format is always as follows: something_2022_01_24.log something_2022_01_24.dmp I want to do three things with these files: find the
prompt and read a value as input for shell script
I am trying to create a shell script where it should prompt and read the values as input and then update the same shell script with that value in a specific line and column. Or if i can use another shell script to get the values and update original file. i wanted to read and update below parameters values as
Python different errors when executing in PyCharm and in shell
I’ve worked on my python project in PyCharm. When I’m executing its different files everything goes smoothly. However, when I’m executing the files in shell, it seems like I get errors that I don’t get in the IDE. For example, being a simplified structure of my project: And being a simplified main.py: The execution in PyCharm is clean, while when
Json response data extraction using linux command
Below is the json response of an api endpoint, I wanted to get the id value of specific name in the below array of json response. eg: I wanted to get id value(10002) of name test3, with the help of name key. Using jq I’m able to select the name key, but I’m not to find a way to get
Cannot assign variable in for-loop in shell script
I tried to assign variable a in for-loop: But when I run, it gave error: Why did it give error? How to assign variable a? Answer There can be no spaces on both sides of the equal sign when defining variables in the Shell. It should be:
shell script to pass argument to input file
I have shell script which takes some input from user and pass that input to the file which i am using inside my shell script Shell script myscript.sh here is de_pod.yaml this is how i am running the script if you look at de_pod.yaml at line command: [“python”, “/script.py”, “$Input1”, “$input2”] here i am using the user input after running