Script is series of instructions written in plain text file. The script interpreter (i.e. shell, Python, Ruby, etc.) can read this file and act on the instructions as if they were typed at the command prompt. The interpreter also provides a variety of useful programming features to make your scripts ...

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Simple way to delete a file and all its links (simultaneously)

I found a lot of questions on how to delete symlinks only, or delete symlinks based on their contents, but no one has asked how to do what I want to do. Take the following example file-l -> ...
0
votes
0answers
3 views

Installation error with Java (JDK 7) [duplicate]

I was trying to install JDK7, got everything done, download completed, but then I got faced with this error: Download done. Removing outdated cached downloads... sha256sum mismatch ...
0
votes
2answers
14 views

How to turn numlock on from command line

So it looks like numlockx is the standard way to have numlock automatically enabled. In my case I have my own scripts that run at startup anyway, and it just feels cumbersome to install an entire ...
0
votes
1answer
13 views

Move folders modified a day prior 6.30 p.m

I need to move folders which are modified a day prior 6.30 p.m. For example. The folders which are modified in Day 1 before 6.30 p.m should be moved to another folder. Please help me. Regards, Syed
0
votes
1answer
19 views

keep track of multiple terminals from shell script

I am writing a quick start shell script to automatically set up my development environment for a current project. However, none of the commands in the shell script can be executed after my server ...
-1
votes
0answers
25 views

Start bash script from another script

I have two scripts /etc/init.d/script_1 and /opt/script_2. I need to call script_2 from script_1. In script_1 i write: /opt/script_2 And it works. But there is small option with script_2 - it must ...
0
votes
1answer
29 views

Bash Script for Running Command in Root in ADB Shell

I am trying to dump the partitions of Android devices with netcat. I have created 3 bash scripts for supporting the process. I have trouble on the second which to dumpt the specific partition ...
0
votes
1answer
36 views

read file names from files for command line

I want to run a program requiring comma-separated arrays of files as follows: program -input1 A.txt,B.txt,C.txt -input2 D.txt,E.txt,F.txt -out out.txt My bash attempt: I'm running command from a ...
0
votes
0answers
18 views

What are the initialization scripts that are executed when logging into Ubuntu? [duplicate]

Apart from ~/.profile, what other scripts are sourced as one logs in to Ubuntu, and in which order? I would like to know specifically about the ones that set the system environment variables, ...
-1
votes
0answers
15 views

Modify Value Tags in xml file by command shell script [on hold]

mapred.tasktracker.map.tasks.maximum 2 The maximum number of map tasks that will be run simultaneously by a task tracker. mapred.tasktracker.reduce.tasks.maximum 2 The maximum ...
0
votes
1answer
24 views

How to *Fully* Automate an Ubuntu Install?

I currently am in a pickle where I have to install Ubuntu on up to hundreds of machines and I cannot use my right hand right now due to an injury. I need a simple way to completely automate the ...
6
votes
2answers
127 views

How to highlight current screen (or window)?

I'm using two screen setup at work and while it usually helps more than it hurts, I have some issues with it. One of them is problem with trailing focus - sometimes I make mistake of typing on wrong ...
0
votes
1answer
24 views

renaming files script error

I wrote code to change the name of bulk of file it should replace spaces with underscores and lowercase all the file name .. this is the code for file in *; do mv "$file" `echo $file | sed -e 's/ ...
1
vote
1answer
43 views

How do I run this script with sudo from the command-line? [duplicate]

I have the following script in my user's bin directory; let's pretend the filename is 'myScript': #!/bin/bash python3 /myPath/myProgram.py "$@" From the commandline, if I type myScript, it ...
0
votes
0answers
22 views

rc.local commands execution

The general idea is: I have developed a script.sh (in java) that take a value from a .txt where a python code is saving data from a sensor, (with a specific range of time). This value is up to the ...
1
vote
2answers
39 views

Cronjob bashscript help

I've looked through a bunch of cronjob troubleshooting guides, but I can't seem to find what I'm doing wrong. This script runs just fine if I run it manually. Running it from crontab just isn't ...
0
votes
1answer
32 views

How to change file text content only with Shell Script commands?

In a file, there is: sd5_crypt UUID=1337 none luks,discard I'd like to change it to: sd5_crypt UUID=1337 /dev/disk/by-label/MON_LABEL_ICI:/keyfile luks,keyscript=/lib/cryptsetup/scripts/passdev ...
0
votes
1answer
37 views

How to write a shell script to start gedit and not showing the terminal window? [closed]

How to write a shell script to start gedit and not showing the terminal window? That means: when I click the file runme.sh, only gedit window shows, no terminal window shows. Just like I click the ...
1
vote
1answer
43 views

Schedule shell script to display output in terminal

I have added a shell backup script to crontab, and it seems to run every night, but I currently need to check the target to see that it's worked. What would be much more helpful would be for the task ...
1
vote
0answers
18 views

Testing post-install scripts

I love to experiment with my Ubuntu GNOME 14.04, so there are many mistakes to be made and things to learn. Often I want a clean install, so I made post-install script. Question is: what is the best ...
2
votes
1answer
39 views

Automatic Account lock/logoff script

I have 2 scripts created. The first one called "lock_logoff" and it does just that. It locks the account in the script and then logs them off. The second script unlocks the account. I got tire of ...
-6
votes
1answer
26 views

script to search all numeric no's greater than or equal to 13 digit

I have a requirement where i need to find the credit card no's in a set of files(*.txt, *.csv or any extension). Credit card no's are numeric and has a minimum 13 numeric digits or more. So basically ...
0
votes
0answers
15 views

Need help writing a script to re-pair with a Bluetooth Mouse

I'm having a bit of trouble with my htpc setup, the bluetooth keyboard connects automatically and works, but the mouse doesn't and has to be re-paired for it to work. It also keeps disconnecting. I'm ...
2
votes
2answers
192 views

Is typescript for `script` command the same as TypeScript maintained by Microsoft? How to print using `ldr`?

Is typescript for script command the same as TypeScript maintained by Microsoft? How to print using ldr ? What exactly is typescript in relation to Linux/Ubuntu ? Searching Google, I find that ...
3
votes
1answer
85 views

Bash script doesn't run from nautilus, but does run from terminal

Before I add more detail to my question, I have to say something very important: Yes my script has "Allow executing file as program" turned on The question itself: For programming reasons (shared ...
1
vote
2answers
78 views

Make a script start after suspend in Ubuntu 15.04 (systemd)

I have a script that starts my broadband connection at start-up and I want to make it start at resume from suspend. My script's is /usr/local/bin/start_my_connection it contains: #!/bin/sh sleep ...
2
votes
0answers
25 views

How to automatically run a script once, after installing lubuntu from a pen drive?

I've got this usb stick I'll send to my sister, and I couldn't put int Ubuntu in it (just little less than 1 gb and few MB short of fitting in 14.04). So I decided to go with Lubuntu. Then, I've ...
0
votes
0answers
20 views

preseed early_script to detect NTFS

I have a PXE server, which permit to deploy Ubuntu images. But some users have already a Windows system, and I would like to detect if Windows is already installed or not on the client machine. I ...
1
vote
1answer
43 views

Help troubleshooting Variable in simple script

So i have this script here Remove Audio Streams of videos - recursively without converting audio or video with FFMPEG But the subtitles part doesn't work. Currently I have tried a few variations of ...
0
votes
0answers
27 views

how to set permission for a windows folder from ubuntu [duplicate]

i'm using dual boot on my laptop UBUTNU 14.04 and WINDOWS 7 i can access to windows partition from ubuntu 14.04 , i want to run a script in a windows folder , but by giving the permission ...
2
votes
2answers
116 views

How can I copy the path to the currently opened file in gedit to the clipboard?

I am trying to write a custom command in Gedit which copies the currently open and active document's path(both upto parent dir & upto file) to clipboard, as I couldn't find any gedit-plugins or ...
1
vote
1answer
71 views

Are there any options of bash with which it is invoked?

I find that the default shell that I use when I start Terminal (with Ctrl+Alt+T) is /bin/bash. And running the built-in command type on bash as: type -p bash returns the result as: /bin/bash ...
1
vote
1answer
24 views

Rename *FINAL.mkv to *.mkv keeping original “*”

So I have a bunch of files created with the name *FINAL.mkv and I have a (1st) script to remove all the files except files with FINAL.mkv I need help renaming the new files back to the original ...
0
votes
1answer
51 views

Remove Audio Streams of videos - recursively without converting audio or video with FFMPEG

Lets say for example you have a season of a TV show, the best encode you can find, but it has multiple audio streams, that you don't need. You don't want to re-encode and loose video/audio quality and ...
1
vote
2answers
51 views

Executing a bash script in the terminal just by its name [duplicate]

I am trying to follow this example in the Bash Guide over here where one can run a script just by its name instead of bash scriptname. First I used these three commands to create a bin directory, add ...
0
votes
0answers
28 views

14.04 Can I create a sound indicator item for a script?

I have made a script to interact with MPC on the command line and would like to add to it so that I can control it in the Ubuntu sound menu. I have added my .desktop file (Below) to the sound menu. ...
5
votes
3answers
358 views

Script for “extracting” subfolders into parent folder

This gonna be a little bit tricky, I guess :-) When I open a terminal in the folder and run a script, that script should: move all content of all subfolders to a top parent folder (recursively) ...
0
votes
0answers
29 views

Definition of basic ubuntu terms [duplicate]

I am new to linux and i wanted to know the difference between the definition on the words : terminal , bash , script , command line , shell Any help would be appreciated .
0
votes
1answer
41 views

How can I get my terminals / shells to have custom designs in it?

How can I add fun stuff to my terminal so I have extra zazz for when I break every thing every day! :D I'm learning C / C++ and think root projects and custom terminals would be fun way to practice ...
0
votes
1answer
46 views

Lengthen Variables

I print data to a form in a console and use tput cup the print it on the same position. This way I can create a sort of form with a small discription of each value. but if you run var=12 tput cup 2 ...
1
vote
1answer
26 views

Customizing Byobu

I'm trying to configure Byobu to show the computers external IP-adress by using this little script in .byobu/bin. The script is called 10_ipadress and contains these lines: #!/bin/sh wget -qO- ...
1
vote
1answer
56 views

Bash script to convert multiple image sequences to video files

I'm trying to make a script to take multiple series of image sequences within subdirectories of the present working directory and send them through ffmpeg to create video files in the present working ...
1
vote
1answer
29 views

Help following instructions (stuck at editing a file)

I'm following these instructions. This is what I've done so far: Installed JDK Downloaded NDK & SDK, extracted them and MOVED them to usr/src Configured my $PATH Ran android and now I'm ...
0
votes
1answer
35 views

Run open and read command on a file within python - not using a script

I'm going through the "Learn python the hardway" - it suggest running "python" from the terminal and using the 'open' and 'read' commands on a file. I created the provided script and sample text file ...
0
votes
0answers
17 views

is there an archive for old questions ? (am looking for a perl-script we together have written) [migrated]

I am looking for 2 different perl-scripts the askubuntu-users and me have together written for usage in systemlog. Is there an archive of perl-scripts which were tested and successfull in 2012 and ...
0
votes
1answer
31 views

running a bash file states:date: command not found

I've installed a version of Ubuntu Server and although I'm fairly still fresh with Ubuntu, I'm trying to create a bash file to run a program in the background. More importantly, I'm trying to get a ...
4
votes
3answers
2k views

Syntax error near unexpected token `('

When I use below code in Ubuntu terminal, it works fine: rm !(*.sh) -rf But if I place the same line code in a shell script (clean.sh) and run the shell script from terminal, it throws an error: ...
0
votes
1answer
29 views

OPENVPN how to stop timed Restart

So far I've got my .sh script to this: sudo openvpn --config /home/customcrafted/Desktop/Misc/VPN/vpnbook-euro1-tcp80.ovpn --auth-user-pass /home/customcrafted/Desktop/Misc/VPN/password.txt ...
0
votes
1answer
41 views

How to get a command to output the contents into Terminal, and my system clipboard [duplicate]

Let's say I have an alias on my system which I often use to tell me my system information, the alias is systeminfo, and it executes lsb_release -a which outputs: No LSB modules are available. ...
0
votes
2answers
46 views

Run python script when a file has been added to a folder?

Is it possible to run a Python script when a file has been added to a folder? In my scenario I have a folder that contains movies and the Python script gets the details (name, year, plot, rating, ...