Tagged Questions

Script are supposed to be smaller program, easy to write and useful for specific and daily tasks. Further reading Repeat a unix command every x seconds forever What Unix commands can be used as a semaphore/lock? shebang and path Allow setuid on shell scripts Looping through files with spaces in ...

learn more… | top users | synonyms (1)

2
votes
1answer
16 views

How do I detect whether changes in nano were discarded or saved?

I am currently writing a small setup script for a Linux application that needs the user to edit a configuration file before the application is started. I've chosen to make the script simply open the ...
2
votes
2answers
39 views

How to add a line to a file which has only root write permission and to continue the script execution

I am trying to learn bash scripting. I am working on a practical problem and at one point I need to add a line to a file which requires root permission to write. The code looks like this: # some ...
1
vote
2answers
50 views

how to detect command interpreter from within a shell script [closed]

Possible Duplicate: How to test what shell I am using in a terminal? For example the following script #!/bin/bash issue_interpreter_name would issue: bash
1
vote
2answers
46 views

How can I rewrite the From: address of an email and resend it?

I have a cPanel web hosting account. On this account I have a PHP-based support/trouble ticket system for my customers to use. I'd like to be able to send an email to both my customer and to the ...
0
votes
0answers
23 views

How can I run my own scripts in kate 3.8.2? “External tools” isn't available in the plugins section

I am using Kubuntu 12.04 LTS. How can I run my own scripts in kate 3.8.2? It appears that the plugin named External tools is no longer available. I would like to run Python or shell scripts in kate ...
0
votes
0answers
50 views

How can I configure programs to ask for password when open?

How can I configure programs to ask for a password when opened? For example, if I'm using Akregator, Kmail, Skype or another program that could have personal information, how could I prompt for a ...
0
votes
0answers
50 views

Bash getopts and passing parameters

I am trying to use getopts and assign different outcomes when a flag is passed. What I am doing is passing a -f flag and what I want to happen is the outcome either puts the command on stdout ready ...
3
votes
2answers
37 views

issues with GNU tail -f and combination of commands

$ tail -f /logs/filename.log | awk '!(/list)' I am able to run this command in GNU Linux flavour But when I written in a script it is not working. test.ksh: variable="/logs/filename.log | awk ...
3
votes
3answers
46 views

command line audio with mpg123 - how to save position in audio and begin from that location next time?

I am contemplating using mpg123 as an audiobook player. I can't find any other good audiobook players for Linux, and I think mpg123 may be my best option. My audiobooks are organized by directories ...
3
votes
3answers
76 views

using stat to provide timestamp for touch

Am trying to OCR some documents insitu (from a linux command line on a windows share). The process of OCRing is find and I have muddled through using the find command to pipe the files through the ...
1
vote
1answer
43 views

Scan for Network attached devices

Is there a way to scan for computers on the network through the command line and get their IP, MAC and DNS names without knowing anything about them?
4
votes
3answers
199 views

What does the following Bash script mean/do?

What does the following script mean? exec 4<&0 0</etc/XX/cfg read line1 exec 0<&4 UPDATE Thanks for the answer, just one part I'm not sure: It redirects fd0 to fd4, and ...
1
vote
2answers
59 views

Verify if a system has DVD burners?

Is it possible to verify if the system has a DVD burner installed? I need this for a script.
3
votes
2answers
106 views

How can I force a bash loop to end if it runs x times in x seconds?

I'm trying to grab batches of input from a remote pipe via ssh. My script below works ok, but I would like to add some sort of check into it so that if something were to go wrong or break the loop ...
2
votes
2answers
79 views

List of script( location)s that get run automatically, and when?

Does anybody know (of a resource listing) what scripts are run automatically, and when, from the moment I startup the computer until it's shutdown again. I know several places where I can add scripts ...

1 2 3 4 5 14
15 30 50 per page