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 (4)

1
vote
1answer
98 views

python hashlib fails to install pip

I have a script that depends on hashlib, but when I try sudo pip install hashlib I get this: $ sudo pip install hashlib Collecting hashlib Downloading hashlib-20081119.zip (42kB) 100% ...
8
votes
2answers
255 views

Is there a “don't disturb” option to temporarily hide notifications, like on macbooks?

Does there exist "Don't disturb mode" as is does for OSX device, where you can decided when notification can bother you, or not.. I just installed chrome, and I usually get spammed by group texts ...
1
vote
0answers
42 views

Scripting dconf changes

I've written a simple script for our Ubuntu machines at college which sets some dconf overrides to set the theme, background etc. However I cannot seem to get it to correctly set the login screen ...
0
votes
1answer
26 views

My bash script doesn't work when triggered by crontab, but works when i trigger it manually?

this is the cron entry */1 * * * * ./home/usr/automation/check_rejected_files.sh > /home/usr/automation/cronout it produce the file but nothing else happen, i added a date log in the beginning ...
0
votes
0answers
25 views

Shutdown multiple minecraft servers with a script

I have multiple minecraft servers running on an ubuntu server. All of them are running in a screen belonging to their according user. I currently have a server running in a screen owned by user ...
0
votes
1answer
20 views

how to get 2 epoch time value in varibale

If I am running this command from command prompt its fine but how to put it in shell script ? Basically this command is subtracting 2 epoch time but I need their output value in a variable. date -d ...
2
votes
1answer
254 views

Bash 12 - 08 Value too great for base (error token “08”)

So, I'm trying to calculate 12-08 (not 12-8) and get the following error: let: 08: value too great for base (error token is "08") Here's the sample code: first=12 second=08 if [[ ($first > ...
2
votes
1answer
37 views

pyosd works with interpreter , but not with a script

I am working on a script that would display arbitrary system information on screen. For that purpose I've been trying to use pyosd module. Consider the following 3 lines: import pyosd p = ...
-1
votes
1answer
78 views

How can I open multiple html files with gedit from a script?

I have a list of HTML files I use for writing. I would like to script to open them for editing. HTML files are associated with Firefox as the Default Application on my system. New to Linux and ...
0
votes
2answers
30 views

Script to enable “source” downloads in a deterministic manner

I wrote a couple of scripts to help users pull their current kernel source package, apply some patches of mine, and build it as a .deb package with make-kpkg. One of the few steps that requires manual ...
-1
votes
1answer
47 views

Help with “grep” command in terminal [closed]

I ran a command on a terminal in Ubuntu: $ grep "Director" file.lst And the output of that command was 1006|Pankaj | Director|sales|03/09/38|6700 I want know the full description of the output ...
2
votes
2answers
68 views

Why does sudo require a password the second time in a bash script every time? [duplicate]

I have a simple very tiny web app, and wanted to make my life a bit easier by having a very simplistic deployment script, that does the following: Pull updates from git Run composer Change owner of ...
0
votes
1answer
31 views

Script to send Email if Log grows past 90M

I have the Below Script to check the size of my Log file. Should it grow to beyond 84M to should be renamed with the current date and a a new one is automatically generated by my APP. However it ...
-1
votes
0answers
16 views

running scripts and emails

first of all let me say that im a linux noob, windows im fine with! We have taken over from a previous guy and he has a custom script which basically copies data from the main nas to the backup nas, ...
-3
votes
1answer
40 views

Scripting a script that tests a shell [closed]

I have a custom shell and want to test its arithmetic function. I wrote a script to test it and it performs the arithmetic but it is also trying to execute the result as a program. printf ...
-3
votes
0answers
32 views

What means the extension .sh and how to run such scripts?

I have download such script and don't know how to run it. Please, give some information. Also, when download NetBeans (Java IDE) has the extension .sh.
2
votes
1answer
56 views

Ubuntu 14.04 Start Terminal on Active Screen

I'm currently working off Ubuntu 14.04 on two separate screens. When I use the keyboard shortcut to start the terminal, Ctrl+Alt+T, the terminal is currently defaulted to open on the screen on the ...
0
votes
3answers
67 views

How can I run a shell script from bashrc file?

What I basically want to achieve is to type in a custom command in the terminal and a specific shell script should run each time. I could achieve the above requirement with folders,by modifying the ...
3
votes
2answers
29 views

How to read symbol separated strings from a variable, convert to numbers, and perform arithmetic?

In a bash script, I wish to pass in a string which is contained in a variable, and contains up to 3 substrings separated by the '+' symbol. Each substring will have a specific numeric value, sort of ...
0
votes
0answers
19 views

Change icon of compiled shell script [closed]

I am using Ubuntu 14.04 and when I compile my shell script (shc -f input.sh) I have default icon of my input.sh.x. It is possible to change this icon? I also tried to change icon location: sudo gedit ...
2
votes
3answers
289 views

Cyclic script execution

How to make the cyclic execution of the script? At the end of the script i need to run it again. Cron is not suitable, because i need to run the script immediately after the previous
1
vote
1answer
30 views

Hot Corners Musical Sequence Command Script

I am writing a script which uses hot corners to play specific musical notes when hovering in corners, and depending on the musical sequence to execute a specific command. The script is called with ...
0
votes
0answers
22 views

Multiple keystrokes in 1 macro script with xmacro

Okay so my situation is that i am trying to make a macro for a video game i know that macros work inside the windows emulator because i have had 1 batten things work in my testing i am using this ...
0
votes
1answer
25 views

Bash script syntax

I want to create a .sh script which will execute a python file called match_scraper.py, update a psql db as shown, call a scrapy spider to execute. When I create the .sh script how do I call ...
3
votes
2answers
53 views

Shell script password with special chars

I've build a shell mysql backup script which works very well. It only has problems with passwords with special chars like this: xgT{uic[Is?uJ+. Here is the important part of the script: #!/bin/sh ...
0
votes
1answer
32 views

How to connect via ssh and use gcc on target?

I would like to do two things automatically within a bash script: Connect via ssh to my target. Execute gcc. My script looks like this: ( echo "cd myfolder" echo "gcc -o mybin ...
1
vote
1answer
45 views

Bash script cannot run with keyboard shortcut

I have this script in my /home/username/ And I can run it via terminal with the following code ./script.sh or sh script.sh it works (it has executable permissions) but I cannot assign it to a ...
3
votes
2answers
49 views

How to check for executable files in a given directory and its sub-directories?

I understand that it is a bad practice to keep files owned by oneself in one's home area which are executable, so I am in need of a script/tool which checks recursively through a given directory (in ...
-1
votes
1answer
35 views

start screen programm with crontab @reboot

I try to start a start.sh at reboot with crontab. But nothing happens afer a reboot, and the log is without an error. Does someone know what i've done wrong? For testing i gave the start.sh and ...
0
votes
2answers
42 views

Can we install a package through a shell script?

I'm trying to write a shell script so that when I reinstall my Ubuntu again. I could just run script and retain all the packages. And I'm planning to pass password in form of argument. My question ...
0
votes
0answers
12 views

Unwanted Delay in execution of rc.local

I have an few commands in /etc/rc.local to set the clock on a Raspberry Pi (running Ubuntu 14.04) from an external rtc. I would like these to be executed during start up, before I log in to the ...
0
votes
1answer
186 views

after upgrade to 16.04 LTS rc.local not executing command

On previous installed version kubuntu 15.xx i added a line into /etc/rc.local > /home/diet/scripts/my-auto-mount-script which obviously referred to a script that if on home wifi network drives should ...
0
votes
0answers
13 views

Service script is not working

I'm able Start Service With init.d script, however doing service start does not work For eg /etc/init.d/haskal start The service is starting fine and service test start Service not running Ubuntu ...
-1
votes
1answer
40 views

Executing shell script

I have a script: echo "start" cd ~/GoogleDrive/ drive push path-to-file/ echo "done" which uploads path-to file to my Google Drive account. I can run this script without any problem by sh ...
3
votes
2answers
316 views

Command line IF not working as expected

I'm relatively new to the terminal programming. I'm trying to run an IF condition within a FOR loop. (The command is to be run by a cronjob) for i in {1..5}; do echo $i; if [ $i>3 ]; then echo $i; ...
1
vote
1answer
66 views

downloads file in parallel [duplicate]

I have list of url(near about 50k) of images in text file which I want to download. Is there anyway I can download it in async way using wget command or any other way, by reading it from text file.
1
vote
1answer
25 views

Script for Dual boot

I am running file server in ubuntu server with dual boot with windows 7 now i want SCRIPT that can restart the server at the midnight and start to windows 7 and i have put some customise script in my ...
0
votes
2answers
37 views

Custom commands with options [closed]

How to create custom shell script/command with flags/options ? $ command -t 2 -h "File"
0
votes
1answer
82 views

Syntax error near unexpected token `newline' while installing Predictionio

I'm new to Prediction.io and when I try to install it following the instruction at this page I get the following error: bash: -c: line 0: syntax error near unexpected token `newline' bash: -c: line ...
0
votes
0answers
13 views

Multiple commands to rtorrent

I am trying to modify the .rtorrent.rc file because I need to run, if possible, 3 commands after a torrent is completed. The task would be : Get the dirname and print it to a file Move the files ...
0
votes
0answers
21 views

How can I run a script when click on soft-link to directory on other partition?

I have created a link to directory on windows partition on Desktop in Ubuntu 14.04. Because this partition will not be automatically mounted at startup the link is marked broken each time I power on ...
0
votes
2answers
25 views

How to start Crontab before login?

Basically I have a script (.sh) that syncs a local folder with an FTP one (using cron to run this). This script needs to be ACTIVE AT ALL TIMES (business use :D) and the only thing I cant control is ...
10
votes
5answers
2k views

.sh specifying extension?

Why is it some systems will run a .sh file just by specifying the file name without extension and others require name plus extension? In my case I'm trying to write a series of commands following ...
0
votes
2answers
46 views

How to write a recuring bash script

I created a program that requires a sequence of command line instructions to scrape new information and update the databases. Is there a way to automate this process so I don't have to type all this ...
1
vote
2answers
46 views

Execute a command stored into a $variable

I made a script where I wrote: COMMAND="/usr/bin/exiftool $PATH_NAME" .... code .... $COMMAND The variable $PATH_NAME is assigned dynamically inside a while loop. The command works fine until it ...
0
votes
0answers
208 views

java not found when running Ubuntu 16.04 desktop snappy app

When running this script from within a Ubuntu 16.04 desktop snappy application I get the message /usr/bin/java not found. Also, the application does not create the files and folders in my Documents ...
1
vote
2answers
50 views

Bash script help, check permission 755 on all files in a folder

I'm attempting to create a bash script where I check if all the files of a specific folder (/tmp) have the permission 755. I also need it to delete all the files that don't have permission value 755. ...
2
votes
1answer
33 views

How to run a parameter as an alias in a shell script?

I have an alias alias ll='ls -lF'; I created a bash script temp.sh: #!/bin/bash # Allow aliases to work in bash NON-interactive mode! shopt -s expand_aliases # .. and load them source ...
3
votes
1answer
71 views

Auto dimming laptop keyboard backlit when idle

On Windows 10, my laptop's keyboard backlit automatically turned off after a minute or so of inactivity. As soon as any activity occurred, they turned back on. On ubuntu, if I run the following echo ...
0
votes
1answer
20 views

Protect root-owned script against tampering and run unattended w/ sudoers' NOPASSWD

Using /etc/sudoers I gave a non-root user (anyuser below) permission to sudo-execute a root-owned script (test-script below) with the NOPASSWD: tag set. The script's permission octal value is 0550. ...