10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Forum,
I'm looking to expand the following command:
INACTIVE_KERNELS=$(python -mplatform | grep -qi red && rpm -qa | grep '^kernel-' |grep -vE `uname -r` | paste -sd \; || echo "Not Red Hat Server")
Currently this command will check if my server is RedHat server using the grep -qi... (6 Replies)
Discussion started by: greavette
6 Replies
2. Shell Programming and Scripting
HI everyone,
I would like to have a script to run a certain linux command and mail the results or output of this command.
This shell is to be later on set as cronjob.
thanks in advance. (9 Replies)
Discussion started by: patrickminas
9 Replies
3. Shell Programming and Scripting
Good afternoon,
I have just messed up and deleted some directories on my UNIX machine.
I would now want to know which packages are impacted by this. Therefore I have a look in the file "/var/sadm/install/contents" (which contains the filenames/directory names for each installation package). After... (2 Replies)
Discussion started by: scampsd
2 Replies
4. UNIX for Dummies Questions & Answers
I am using grep to match a pattern, but the output is strange.
$ grep -r -o "pattern" *
Gives me:
Binary file foo1 matches
Binary file foo2 matches
Binary file foo3 matches
To find the lines before/after, I then have to use the following on each file:
$ strings foo1 | grep -A1 -B1... (0 Replies)
Discussion started by: chipperuga
0 Replies
5. Shell Programming and Scripting
Hello ,
When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies
6. Shell Programming and Scripting
Hi,
Need help with a sed command that I am using to substitute 3 positions of a pipe delimited file.
i am getting different results while substituting the same position of two different files with the same value. Please see details below:
$ cat chk2
... (3 Replies)
Discussion started by: vmenon
3 Replies
7. Shell Programming and Scripting
I have an overnight script which runs across a large directory to repair permissions and ownership. I also have this command output the list of files affected so that cron can email these as a log file. Previously I had the command in the form:
find /path/to/files -not -user myname -print -exec... (4 Replies)
Discussion started by: mij
4 Replies
8. UNIX for Dummies Questions & Answers
I'm using the command grep -l XYZ to get a list of files containing the string XYZ. Then I using the comand ls -l ABC to get the create date timestamp of the each file. I've tried combining the comands using the pipe command, grep -l XYZ | ls -l, but its not working. What am I doing wrong? (3 Replies)
Discussion started by: jhtate
3 Replies
9. UNIX for Dummies Questions & Answers
ls -ltr | grep string
How can I use regular expressions to filter the results provided even more. I am using the above command as a reference. (1 Reply)
Discussion started by: ckandreou
1 Replies
10. UNIX for Dummies Questions & Answers
Hello
I would like to perform a select from a oracle table and return those values to my shell script
For example:
site=head -1 $infile | cut -c1-15 | awk '{printf "s%", $0}
sqlplus -s /nolog |& #Open pipe to sql
select col1, col2, col3, col4
from oracle_table
where col5 =... (6 Replies)
Discussion started by: houtakker
6 Replies