05-20-2009
Thank you Pad. Just to understand more. What if I want to add an option to the command? Say instead of ps, I want to type ps -e.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
AIM: Need to test for the presence of some files (*.F) in a certain directory.
having a problem with this line is ksh:
if test `ls $SOMEDIR/dir/*.F \
2>/dev/null|wc -w` -eq 0
Basically testing for the presence of *.F files in the specified directory. If the return... (4 Replies)
Discussion started by: enoch
4 Replies
2. UNIX for Dummies Questions & Answers
Hi
If my ls -l results in 1000 lines and i just want to see the last few lines in the list what arguments do i pass
eg lets say i want to see only the last 5 lines of 'ls -l' result (2 Replies)
Discussion started by: zomboo
2 Replies
3. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
4. Shell Programming and Scripting
HI
I have a text file named docs with 100 filenames with full directory path one by one. I want to perform an action on all of them, the action i want to do this chown bin:bin <filename>. The <filename> should be each line in the docs text file. Please give the code. Somebody told to use for... (2 Replies)
Discussion started by: PrasannaKS
2 Replies
5. Shell Programming and Scripting
Hi All,
I was testing for blank lines and I want to use the cat command only
for groupline in `cat /home/test/group`
do
if
then
echo "blank found"
fi
done
I want to check if the current line read is a blank line.
I have tested with $groupline="\n" ,... (11 Replies)
Discussion started by: datkan
11 Replies
6. Shell Programming and Scripting
i hav a text file(abc.txt) in which it have 2 lines as shown
Number of agencies didnt send the file= 0
sum of reject files= 0
######
to get one line from the text file ... i use grep command
grep 'Number of agencies didnt send the file= 0' abc.txt
... (7 Replies)
Discussion started by: nani1984
7 Replies
7. Shell Programming and Scripting
I have been doing a lot more bash on LINUX RedHat and Ubuntu lately, and one thing keeps cropping up intermittently. If I do a $( some-commands ) Command Substitution, the some-commands are logged onto my screen each time they are evaluated. Did I turn on some odd option? It seems to happen just... (13 Replies)
Discussion started by: DGPickett
13 Replies
8. Shell Programming and Scripting
I am writing a script and my command is long so it goes down to the next line, but it does not run properly, the pipe is missing the wc -l. how do i fix this problem.
find ${ARCHIVE}/${dir} -type f -name "${TEMP2}*" | awk -F/ '{print $NF}' | wc -l (8 Replies)
Discussion started by: football12345
8 Replies
9. UNIX for Advanced & Expert Users
Hi,
I have a requirement like, I have a list of pattens in a file say pattern.txt,
PHC111
PHC113
and in another file called master.lst i have entries like,
PHC111
a
b
PHC112
a
PHC113
b
c
PHC114
d
e (5 Replies)
Discussion started by: rbalaj16
5 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I have an encoded file and I wish to see what is written inside.
The first line is given below:
eval "$(dd if=$0 bs=1 skip=69 2>/dev/null|gpg -d 2>/dev/null)"; exit
PS: When I google above code, it says that command is use for encryption...
Following lines include many strange... (2 Replies)
Discussion started by: baris35
2 Replies