10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I didn't use SED for 20 years and was never an expert. So my current knowledge is about zero. Please be patient with me. I'm neither a native speaker.
I have a huge dictionary file and want the rest of the lines stripped. Everything after (and including) the "/" should be stripped. I... (2 Replies)
Discussion started by: Hinnerk2005
2 Replies
2. Shell Programming and Scripting
Hello, sorry if this has been asked before, I couldn't find what I was looking for.
I know how to connect to Oracle and execute stored procedures from a shell script, but what I would like to do is return a value from a table and use it in my script.
For Example, If I had a table Called... (1 Reply)
Discussion started by: mode09
1 Replies
3. Shell Programming and Scripting
Single command to ls all the files inside a particular directory hierachy and output this to a file and open this in a vim file so that i can use gf command in vim to browse through all the files inside this hierachy.
eg :
dir1/dir2
and
dir1/dir3
dir2 and dir3 contain the files i need... (7 Replies)
Discussion started by: dll_fpga
7 Replies
4. Shell Programming and Scripting
Hello,
I try to concatenate a command to execute. Sadly it throws an error.
#!/bin/bash
cd /
cmd="find -name *.txt | awk '{ printf "FILE: "$1; system("less "$1);}' | egrep 'FILE:|$1'"
echo "1."
$($cmd)
echo "2."
$("$cmd")
echo "3."
`$cmd`
echo "4."
`"$cmd"`1.&3. 'find: paths must... (2 Replies)
Discussion started by: daWonderer
2 Replies
5. Shell Programming and Scripting
Hi all,
Can someone help me with the following problem.
I am executing the following command:
(search for occurences of 'error' in files that match cl-*.log expression)
> grep -cw -i --max-count=1 'error' cl-*.log
this command outputs:
cl-apache.log:1
cl-apache_error.log:1... (3 Replies)
Discussion started by: epro66
3 Replies
6. UNIX for Dummies Questions & Answers
Hi My friends
I have used this command to find files are modified within the past 24 hours
and then many files are shown but I want transfer all these files to special directory by using pipe .
can any one tell me what is the next step ? (11 Replies)
Discussion started by: bintaleb
11 Replies
7. Shell Programming and Scripting
hi
i'm running a shell script that checks the amount of cpu idle either using /usr/bin/vmstat 1 2 or sar 1 2 (on unixware) before i run some tests(if cpu idle greater than 89 I run them).
These tests are run on many platforms, linux(suse, redhat) hp-ux, unixware, aix, solaris, tru64.
... (5 Replies)
Discussion started by: OFFSIHR
5 Replies
8. Programming
Hi,
I have one shell script which is calling a C executable. That C executable returns a value depending upon operations inside the C code. But how to get that value in the calling shell script?
The syntax of calling the C executable is like --
C_exec <argc no> <argument1> <argument2> etc... (5 Replies)
Discussion started by: k_bijitesh
5 Replies
9. UNIX for Dummies Questions & Answers
current dir :
/home/sales
ls -l
abc.txt 17th aug
bcd .txt 16t oct
-------
------
Total files : 100
if i want to move only those files dated 17 aug into another sub directory /home/sales/texas
how do i pipe the result of 'ls' command to a 'mv' command (1 Reply)
Discussion started by: zomboo
1 Replies
10. UNIX for Advanced & Expert Users
Hi All,
I want to create a command that executes a text editor with the most recent file in the current current directory.
So a good start to achieve this is :
ls -lrt | cut -c55- | tail -1
which provides the name of the most recent file in a directory
The problem is to pipe the... (4 Replies)
Discussion started by: anonymous.nico
4 Replies