A script is a sequence of commands or instructions that are executed by an interpreter program rather than compiled into a standalone executable program.

learn more… | top users | synonyms (2)

0
votes
0answers
14 views

tmux script to open a new window and run a script, keeping the window open

I am working on porting a script of mine to use tmux. Essentially it takes a text file and executes a command with each line of said file in it. Right now it uses gnome-terminal and opens a new ...
-2
votes
1answer
40 views

How to find the word before a match

I have the following log file. I need to know if there are any fault / suspect condition using a shell script. I need to find fault and check the previous word, if it is greater than 0 then there is ...
0
votes
1answer
13 views

Parsing a delimited in ksh as command argument

My system generates a flat file with 7 arguments : Field1,Field2,Field3,Field4,Field5,Field6,Field7 Field1,Field2,Field3,Field4,Field5,Field6,Field7 Field1,Field2,Field3,Field4,Field5,Field6,Field7 ...
0
votes
1answer
51 views

Help creating a bash shell script based around the ls command [on hold]

I'm trying to create a bash shell script that will take an input directory and give me the name and size (with units) within. I'm a bit new to shell scripts, so I've been able to build the script to ...
0
votes
1answer
25 views

can mmv rename files by incrementing an index?

Can mmv, a mass move utility, nicely rename files from: foo.txt bar.txt baz.txt to: 1.txt 2.txt 3.txt The man page is intriguing, but I don't quite follow the directions: Rename all ...
1
vote
1answer
37 views

Script a mobile recharge website

I recently come to know that I can curl a website using the bash command curl --user user:pass xyz.com I have an idea for recharging my mobile using the bash script. I want to write a script which ...
-2
votes
1answer
42 views

How can I make a bash script that uses the ls -l command on a given argument?

How can I make a bash script that uses the ls -l command on a given argument? I have a text document containing my shebang ect... but when I add the ls -l command, it only works on my cwd. Say my ...
0
votes
2answers
54 views

Arithmetic Syntax Error when running a script in RedHat OS

I am encountering a problem when I try to run a script in RedHat OS. I get an arithmetic syntax error. Now here's the script that I am trying to run: #!/bin/ksh echo "" echo " = K+WA ="; ...
0
votes
1answer
20 views

regex to remove last four characters

Is there a way I could eliminate the last four characters with regex in the below one line script as I convert .wav files into .mp3 files. As of right now my single line script produces files ending ...
0
votes
2answers
49 views

Assign names stored in a file to numbers stored in a second file

I have two files: >head(fileA) 2 1 544.8 1279.2 1.0603 3.2460 0.0542 3 1 546.2 1277.8 1.0463 3.2460 0.0553 3 2 543.9 1280.1 0.1652 3.2460 0.0177 4 1 ...
0
votes
2answers
27 views

Run this PHP file via Cron Job

Here is the script: <?php //Create back files? define('CREATE_BACKUPS', FALSE); if (!is_dir($argv[1])) { echo "You must enter a valid path such as /home/apresv/public_html or ...
3
votes
2answers
100 views

echo $PATH shows path to python scripts, but they cannot be executed

I am new to using the shell, and wanted to create a directory in $HOME where I can put all my python scripts, set a path to that directory, so that I can go into any folder on my Mac and execute those ...
0
votes
2answers
32 views

Help creating script to move files based on date or filename

I have an FTP process that is constantly putting files into a directory. The date created is part of the filename in a format like this: YYYY-MM-DD-HH-MM-SS-xxxxxxxxxx.wav I would like to move the ...
1
vote
1answer
16 views

How do I script deluge to get information about torrents?

Dealing with a lot of torrents is not always convenient when using GUI. I tried deluge-console info, but that didn't give all the info I wanted. So, to make it clear, what I need is a script, that ...
0
votes
1answer
24 views

Reading file using shell script, format of the line has changed

I am reading a file using the following code: displayLine(){ echo $line } filename="SampleFile" while read line do displayLine $line done < "$filename" The format of the file that I am ...

15 30 50 per page