10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
given the file
FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 FIELD7 FIELD8 FIELD9 FIELD10 FIELD11
Why does not
awk '$6 == "FIELD6" {$6=="GREEN"}1' file
do the work and replace"FIELD6" by "GREEN"?
And second question, what is the purpose of the "1" at the end of... (5 Replies)
Discussion started by: la2015
5 Replies
2. Shell Programming and Scripting
Hi everyone I'm new here and I don't know some command of unix, please help by describe me how it work, I study unix command by myself and can't search exactly means so...Thanks :D
sqlplus -s /nolog @${SQLFILE} ${file_type} >> ${OUTPUT_FILE}
date "+%Y%m%d%H%M%S"
$/usr/bin/echo "INFO : $1"... (2 Replies)
Discussion started by: zound617
2 Replies
3. Shell Programming and Scripting
I am currently having a problem with displaying multiple occurences of a line using grep/sed combination. Let's say that I do grep "$anything" $file.
When I do this it only displays a single line, but if I do grep -c "$anything" $file it says that there are 3 occurences of $anything, but how can... (15 Replies)
Discussion started by: puttster
15 Replies
4. Shell Programming and Scripting
input1
a_a a/a 10 100
a1 a_a 20 200
b1 b_b 30 300
input2
a_a a/a xxx yyy
a1 a1 lll ppp
b1 b_b kkk ooo
output
a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies
5. UNIX for Dummies Questions & Answers
#! /bin/sh
envname=$1
if ; then
echo usage : `basename $0` envname
exit -1
fi
can someone explain what exactly this does (1 Reply)
Discussion started by: bn_unx
1 Replies
6. Shell Programming and Scripting
how do I alias the following command:
ls -l |egrep 'drw|dr-|d--|d-w'
The alias command needs single quotes and so does the above command, so this does not work:
alias LSDIR 'ls -l |egrep 'drw|dr-|d--|d-w' '
My problem is how do I get a listing of only directories?
Solaris 8
SUN Ultra 10... (4 Replies)
Discussion started by: ajp7701
4 Replies
7. Shell Programming and Scripting
I am not that good with AWK. Is there a simple awk command I could use to get the word "this" from the following text besides using "awk -F ":" '{print $2} | awk -F " " '{print $1}"?
:this is:that is: (6 Replies)
Discussion started by: 2dumb
6 Replies
8. Shell Programming and Scripting
Hi!
I'm having problems to get this simple script done:
I need to insert 50 lines with the value from the variable dtm=`date +"%d"` into a new file, how do I do that using the "for" or "while" loop commands ? Is there any other command I can use to do that ? I'm new to shell scripting, as you can... (8 Replies)
Discussion started by: dfs
8 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have the following file:
--#
--#line1
--#line2
--#line3
--#
--#line4
--#line5
and I want to use something like:
sed 's/--#/newline/g' file > newfile
to substitute the lines containing only '--#', but when I try, it replaces every instance of '--#' with 'newline' and I... (7 Replies)
Discussion started by: Dave724001
7 Replies
10. Shell Programming and Scripting
Hello,
I've got a problem with SED. It's my intention to shorten a file path (removing the file name) with the help of SED. Something like:
tmp\folder1\folder2\blah.txt has to be transformed to
tmp\folder1\folder2\.
I suppose, it's on the tip of my tongue. Perhaps it's close to:
sed... (2 Replies)
Discussion started by: sysadv
2 Replies