A script is a sequence of commands or instructions that are executed by an interpreter program rather than compiled into a standalone executable program.
1
vote
1answer
16 views
Differences between %pre and %post in Kickstart on CentOS?
I have been setting up machines with Kickstart on CentOS and I am unsure about the differences between the %pre and %post sections of the kickstart .cfg file.
The CentOS Documentation for the ...
0
votes
0answers
7 views
mysql optimized query execution [migrated]
As part of an ongoing research work, I am checking if an URL exists or not using the cURL command. I have been executing a shell script for couple of days and it is doing some updates for each URL in ...
6
votes
1answer
85 views
Parallel execution of bash script
I have a table URL_Experiment in my database (mySQL database). I have 2 million URL links in this table.
For each URL, I am checking if some particular text is present in the URL and updating the ...
0
votes
1answer
25 views
Need to grep for specific lines from ongoing log and save it in some file
So, let me start with the overall outcome that i want to achieve.
There is just one log, which will have info on certain devices, that i am upgrading.
I use "tailf log" to monitor the log.
Now, ...
1
vote
1answer
24 views
Pressing tab after sourcing script file prints script related output
I have a script file in a directory. Its contents are as follows :
#!/bin/bash ...
1
vote
1answer
18 views
print all values of a file after removing some characters using grep
I have a file in which the values are stored as below.
Assistant Professor at SASTRA University
St John's memorial college
Paul George Univeristy
Department Chair at University of Texas
I am ...
2
votes
3answers
46 views
Extracting characters after a particular text
I am extracting a page from website using cURL command.
curl "www.google.com" -s | w3m -dump -T text/html > foo.txt
The w3m command outputs the HTML page in a much more simpler format so that ...
2
votes
1answer
44 views
shell script construct array for file elements
I have a file named input_file which contains some lines. I need to remove certain characters in the line and store them in an array. So to remove the characters, I use the sed command and storing in ...
1
vote
2answers
26 views
Make Trickle get the correct $PATH
Trickle is a bandwidth limiting program. I have the following script for trickle.
#!/bin/bash
echo $PATH
trickle -s -t 3 -u 200 -d 200 "$@"
I have a script in ~/bin/ that want to run the script ...
-5
votes
0answers
42 views
emrgency plz can you help? [closed]
#!
output=($(df -h /))
echo "${output[11]}"
if [ "$output[11]">="63" ]
then
echo "Alert !!!!!! Disk Is Full"
fi
-
day_by_name=$(date +'%A')
month_by_name=$(date +'%B')
day_by_num=$(date ...
1
vote
1answer
31 views
curl and grep commands output into a new variable
I am extracting information from a website. I designed the code in VBA and found that it is taking too long to execute. So, I have decided to rewrite the code in Unix script. I am extracting a page ...
0
votes
0answers
9 views
Add a column to fits file with python/pyfits [closed]
I have a fits files of event data, and I need to modify one of the tables by adding a new column of data derived by the data stored in a preexisting column of the same table. I looked at the pyfits ...
0
votes
1answer
41 views
What's the safest way to pipe an email to a script via procmail?
I have a simple procmailrc recipe that hands mail off to a script:
LOGFILE=/home/foouser/procmail-log
VERBOSE=yes
MAILDIR=/var/spool/mail/foouser
DEFAULT=/var/spool/mail/foouser
SHELL=/bin/sh
...
2
votes
1answer
34 views
Why does AWK not like dots in one of two substitutions?
I'm trying to use AWK in a bash script to look for a placeholder string in a template file and replace it with the contents of a variable that (can) contain various special characters.
Example:
...
2
votes
2answers
66 views
Use awk to split line into array and use that array's values in calling shell
First of all, my apologies for the somewhat clumsily worded title. If you can think of a better one, please feel free to edit. [EDIT: done]
What I am trying to do is use awk inside a bash script and ...