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
1answer
9 views

Nmap Error when using the “–script” arg

i just installed the nmap network scanner, and when i try to use it whith the "-script" parameter, it doesn't work: example: soufiane@soufiane-cvc:/usr/local$ nmap -p143,993 -Pn –script ...
0
votes
0answers
11 views

Bash Script for Dumping the Android Partition is not consistent

I really need your suggestion about my current problem. I am trying to dump the whole partitions on the Android with netcat. I have created 4 bash scripts for automation process. So, I only need to ...
2
votes
1answer
44 views

Trying to Get Total CPU Usage in Bash

I'm trying to get the CPU's total load with this: IDLE=$(mpstat | grep "all" | cut -c 92-) CPULD=$(expr 100 - $IDLE) echo $CPULD but it always returns: expr: non-integer argument on the second ...
0
votes
1answer
22 views

View the live log in linux

I want to See the Live log from the Log file which is being used within the Script. i have script which makes VPN connection to CISCO VPN Server and then COpy the files to the Remote Location. for ...
3
votes
1answer
25 views

how to make a BASH script to find all php.ini files in dir tree and append text to them

My hosting company advertises a php max upload size that can go up to 60M but, It defaults to 2M and I am not able to make changes to the htaccess file. I can override the default by changing the ...
0
votes
0answers
18 views

Setting IP routes using script

My Setup In this setup, the server can see the routers but not see each other causing the clients to not be visible to each other as well. The VPN is set up using PPTP and the routers have DD-WRT ...
1
vote
1answer
11 views

Minimal server configuration only to send logs via mail from scripts on Ubuntu

I have a Ubuntu 12.04 configured as Gateway and OpenVpn server. I have made a script that changes the VPN destination based on destination reach-ability. Now I want a simple command included on the ...
0
votes
1answer
31 views

File not running on startup

I have a file that starts another script in a folder. When I run this file using command sh /etc/init.d/scriptname it runs the other script fine. The file has the 001 permission that I assumed it ...
2
votes
1answer
17 views

udev script doesn't run in the background

I'm having trouble getting a script run by udev to run in the background on usb insert. My udev rule seems to work, since it definitely calls the script, but no matter what I do, I can't get bash ...
1
vote
0answers
24 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
21 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
23 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
39 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
38 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
16 views

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

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
26 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 ...
7
votes
2answers
159 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
44 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
34 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
44 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
20 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
40 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
18 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
197 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 ...
5
votes
1answer
107 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
86 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
28 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
44 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
124 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
53 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
363 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
42 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
29 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- ...