A shell script is a script written for the shell, or command line interpreter, of an operating system.
2
votes
2answers
26 views
Specifying a generic interpreter for a program like expect?
I am writing expect script which can be used on mulple operating systems but the problem is
i can't use #!/usr/bin/expect evreywhere so instead i tried to do
#!`which expect`
at the top but it ...
2
votes
1answer
22 views
exec cp failes from script, yet works when issued directly
I have a script that copies SQL backups to a windows server. Here's the line from /etc/fstab:
//my.win.box/share$ /winshare cifs ...
0
votes
0answers
10 views
IBM V7000 scripts for monitoring
Hello (I'm no hard core coder:),
I try to develop a script to do some very basic monitoring on an IBM SVC.
My goal is to get some information about the nodes and my quroum status and then send ...
-1
votes
0answers
32 views
There is a small correction tn shell scripting in linux [closed]
Script requirements:
In a folder there will be N number of files, let’s say 50 or 60. All these files are txt files which are tab separated excel files. Each file contains 8 columns. (Among them ...
3
votes
5answers
92 views
How to use ' in alias?
I have one-line that I want to call using alias.
while printf '%s ' "$(df -P / | awk 'NR==2 { print $(NF-1) }')"; do sleep 30; done
I tried to escape ' like \' but it didn't work.
What is the ...
0
votes
5answers
76 views
How to display result of df every 30s? [duplicate]
All I want to see is the % after I issue df / every 30s but on the same line just after the previous number.
So the final output would be 86% 86% 86% 87% 87% ......
Could it be one line code? Or ...
5
votes
2answers
25 views
Modifying zsh globbing patterns to use with cp
I'm trying to write a script to copy files recursively from a particular folder except files A.extn, B/*.extn and C/* where B and C are directories and extn is just some generic extension. This is ...
0
votes
1answer
20 views
Starting Resque worker with script doesnt work, starting by hand does
I am trying to figure out why my process doesn't work if started via a script, but works fine if started by hand.
Here's the details:
script is a resque worker start script. The script location is ...
2
votes
3answers
45 views
How to convert all .wav files in subdirectories to .aac using neroAacEnc?
I have a collection of music in .wav format, and would like to convert it to .aac/.mp4 using neroAacEnc.
How do I do this?
I am using Arch Linux x86_64 and Xterm.
6
votes
2answers
92 views
how to get exit status from the command before the last
I have solaris machine ( solaris 10 )
please Look on the following simple commands (haconf -makerw | grep -iq "Cluster already writable")
# haconf -makerw
VCS WARNING V-16-1-10364 Cluster ...
0
votes
4answers
47 views
concatenating multiple files with multiple headers
Im trying to concatenate multiple files with multiple headers to have one file with all the information in it for example.
File 1:
Numbers
1
2
3
Letters
A
B
C
File 2:
Numbers
4
5
6
Letters
D
E
...
0
votes
2answers
71 views
How can I run a shell script as a daemon under Redhat?
I've got a shell script, which is essentially a one liner with some logging, which I'm trying to run this from an init script. I'm using the daemon function inside of /etc/init.d/functions to run it, ...
1
vote
1answer
45 views
XML parsing using xmllint and customizing the output
I have xml file (say input.xml) of the following schema:
<?xml version="1.0"?>
<TagA>
<TagB>
<File Folder="FOLDER1M\1" File="R1.txt" />
</TagB>
...
5
votes
4answers
97 views
Show sum of file sizes in directory listing
The Windows dir directory listing command has a line at the end showing the total amount of space taken up by the files listed. For example, dir *.exe shows all the .exe files in the current ...
1
vote
0answers
30 views
Using sshpass, return code (exit status) differs for reasons unknown using valid commands
There are a few things going on here but I think ultimately, either CLish or SSH is returning an exit code that is messing up my work flow.
I'm attempting to connect to a remote machine (CLish shell) ...