10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
The following awk command :
asmcmd lsdg | awk '{print $13;}' | grep -i ${SID}
return the following output . An Empty line + two lines contain "/" at the end of the line
INDEVDATA/
INDEVFRA/
I need to remove the "/" as well as the empty line.
Please advise
Thanks (3 Replies)
Discussion started by: Yoav
3 Replies
2. UNIX for Dummies Questions & Answers
Well,
i have a script and it makes a txt like this :
Caps 12
cans 9
cols 10
my print line is something like this
for(i in a)
print i, a;
i have to order the txt from higher to low like: (6 Replies)
Discussion started by: matius_88
6 Replies
3. Shell Programming and Scripting
Hello All,
I have this script to awk IP to new file.
#awk '/myip|yourip/ {sub(/...\....\....\..../, newip)}1' newip=$IP existing.txt > new.txt
When existing.txt has myip=192.168.123.123 and $IP has 192.168.12.12, the awk script is not working. But while I add zero left padding to $IP i.e,... (3 Replies)
Discussion started by: Shaan_Shaan
3 Replies
4. Shell Programming and Scripting
When the line contains abc, it will goes to the next line and substitue the MM to NN
bc 23 33
abc 23 33
ddd MM xx
dff MM 33
cat xxx |awk '{if ($0~/abc/){getline;sub(/MM/,"NN")}{print}}', It doesn't show "abc 23 33
bc 23 33
ddd NN xx
dff MM 33
bc 23 33
abc 23 33
ddd NN xx... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
5. Shell Programming and Scripting
dear,
I have below file called folderlist.txt
# ParentFolder environment_flag SubFolders
triss 1 checksum
bookstructure 1
fx 1 checksum_GMDB
I have a script which which will create the folders under... (3 Replies)
Discussion started by: manas_ranjan
3 Replies
6. Shell Programming and Scripting
hi all,
how do i assign values passed in from command line to and sql statement in perl ?? e.g
i want to assign :name1 and :Name2 to be whatever is passed into the perl script command line
my $sqlStr = "select * from test_table where column1 = upper(nvl(:name1, name1 )) and column2... (1 Reply)
Discussion started by: cesarNZ
1 Replies
7. Shell Programming and Scripting
I am having the following problem. I am having a lot of files (test_1_01.hea, test_1_02.hea, etc) with the content:
project_directory /net/1/d_1/5/
tmp_directory /net/1/d_1/5/
material_directory /net/1/d_1/5/
And I have to substitute the filepaths with new counted ones where the... (3 Replies)
Discussion started by: ergy1983
3 Replies
8. Shell Programming and Scripting
I want to reformat the following:
ID1 ID001 0 0 2 1 GG TC GG CT GG AA AA AG
ID2 ID002 0 0 2 2 GG 00 AG CC GG GG TC CC
I want to replace only:... (1 Reply)
Discussion started by: genehunter
1 Replies
9. Shell Programming and Scripting
Hi,
I am new to this forum and my script skills are very weak.
I have this file (file 1) that contains 3 columns (tab delimited):
kyle start stop
john start stop
joe start stop
And I want to replace name (column 1) from another file. This other file has two columns, one is the... (4 Replies)
Discussion started by: kylle345
4 Replies
10. Shell Programming and Scripting
Hi,
I am trying to redefine the value of a variable based on another variable value. And I want to read in my variables from a enviroment file in the end -- at least I think so. But 1st here's what I want I need to get working:
var_1="11 10 9 8 7 6 5 4 3 2 1"
var_2=3
var_3=4
So I want... (12 Replies)
Discussion started by: John Rihn
12 Replies