10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have the following code:
#!/bin/csh
clear
set cloud_file="/home/labs/koren/davidsr/general_scripts/MFP_10_PP_Parmas.txt" # to fill
set mie_tables_dir='/home/labs/koren/davidsr/SHDOM_MAIN/MIE_TABLES/non_polo_wave_0.7_water_50R_s0.5_e25_max_70.mie' # to fill
set prp_dir='${pp_dir}/pp_prp/'... (2 Replies)
Discussion started by: student_wiz
2 Replies
2. UNIX for Beginners Questions & Answers
I have below code inside my awk script
if ( $0 ~ /SVC IN:/ )
{
svc_in=substr( $0,23 , 3);
if (msg_start == 1 && msg_end == 0)
{
msg_arr=$0;
}
}
else if ( $0 ~ /^SVC OUT:/ )
{
svc_out=substr( $0, 9, 3);
if (msg_start == 1 && msg_end == 0)
... (6 Replies)
Discussion started by: bhagya123
6 Replies
3. Programming
Hi
mY files paths are defined as :
//sbase = 'D:\data\sample_AMC\fasta_files\';
sbase2 = 'D:\data\sample_AMC\fasta_files\results\';
snameprefix = 'orig_ind';
snameprefix3 = 'results_ind';
...
const string filname = sbase + snameprefix + snamesuffix;
const string resultsname_ =... (2 Replies)
Discussion started by: siya@
2 Replies
4. Shell Programming and Scripting
I have a file that looks like this:
John Smith
http://www.profile1.com
http://www.profile2.com
http://www.profile3.com
Marc Olsen
http://www.profile4.com
http://www.profile5.com
http://www.profile6.com
http://www.profile7.com
Lynne Doe
http://www.profile8.com
http://www.profile9.com... (3 Replies)
Discussion started by: locoroco
3 Replies
5. Shell Programming and Scripting
In Bash using AWK or sed I need to convert the following file:
...
numitem_tab0 =<p>1 KEYWORD</p><p>2 KEYWORD</p><p>3 KEYWORD</p><p>4 KEYWORD</p><p>5 KEYWORD</p>...<p>25 KEYWORD</p>
subitem_tab0 =<p></p><p></p>
...
numitem_tab6 =<p>1 KEYWORD</p><p>2 KEYWORD</p><p>3 KEYWORD</p><p>4 KEYWORD</p>... (2 Replies)
Discussion started by: pioavi
2 Replies
6. UNIX for Dummies Questions & Answers
Hello All,
How to concatenate a string to a variable in a script
I'm having a file which is consisting of data and i need to extract the first line of the file and append it to a string.
/tmp/samp.list containg 60000
I like to concatenate it with a string (SS_)
grep -w SS_$(head -1... (1 Reply)
Discussion started by: nkamalkishore
1 Replies
7. Shell Programming and Scripting
Is there a way to concatenate two strings, where the first string is "-n" and there is a space between the "-n" and the second string? Below are some examples of what I tried.
#!/bin/sh
var1=test
#working without dashes:
var2="n $var1"
echo $var2
var2=n" "$var1
echo $var2
var2="n... (5 Replies)
Discussion started by: wolfv
5 Replies
8. Shell Programming and Scripting
Please look into the example.
My source file is like,
00,57,3,2008-07-24 06:30:06
10,1,8025171,"1M00",17907023,2008-07-23 18:16:58
10,2,8025171,"1M00",17907023,2008-07-23 18:17:01
99,184
What should i do if i want output like...
hello,00,57,3,2008-07-24 06:30:06... (7 Replies)
Discussion started by: pkumar3
7 Replies
9. Shell Programming and Scripting
I need a way to build variable in this manner:
variable_$i
Inside a for loop i need to create it.
where i goes from 1 to 30..
and then i need to print them on screen with echo $variable_$i
which is the best way to do this? (6 Replies)
Discussion started by: sreedivia
6 Replies
10. Shell Programming and Scripting
Hi , i want to Concatenate a string and use the following code
str="i"
str="$str am \n"
str="$str a \n"
str="$str boy \n"
echo $str
I want to ouput this
i
am
a
boy
However it outputs
i am \n a \n boy \n (3 Replies)
Discussion started by: youareapkman
3 Replies