10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to remove $1 along with the blank values from the file. Thank you :).
file
R_Index Chr Start End Ref Alt Func.IDP.refGene Gene.IDP.refGene GeneDetail.IDP.refGene Inheritence ExonicFunc.IDP.refGene AAChange.IDP.refGene avsnp147 PopFreqMax ... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. UNIX for Advanced & Expert Users
Hi ,
I have file which consists of multiple new lines. I need to identify the new line in every row of the file and remove it. It is having record delimiter as "|" and final delimiter of the line is "end" Can anyone from the forum suggest me how to remove the news lines from entire file?
example... (11 Replies)
Discussion started by: etldeveloper
11 Replies
3. Shell Programming and Scripting
Hi
Ich have a list as follows
73
5
100
45
81
4
and I would like to have an output (on screen) like that
73
5
100
45
81
4 (6 Replies)
Discussion started by: lazybaer
6 Replies
4. Shell Programming and Scripting
Hi all,
I need to prune a var's content as follows:
VAR='blah blah # seew seew'
NEWVAR='blah blah'
(without blanks)
I need also to perform this change by using variable substitution within bash shell. I've tried it with the following subst:
VAR2=${VAR/ \#*/}
but the... (7 Replies)
Discussion started by: yomaya
7 Replies
5. Shell Programming and Scripting
I have various column names within double quotes, separated by commas.
Example:
"column one", "column number two", "this is column number three", anothercolumn, yetanothercolumn
I need to eliminate the double quotes and replace the blanks within the double quotes by underscores, giving:
... (5 Replies)
Discussion started by: jgrogan
5 Replies
6. Shell Programming and Scripting
Hi
I need to delete trailing spaces, tabs and unprintable charactes from the file.
This file has a number of blank lines which should be left intact. Another words I am trying to remove the junk at the end of each line. Does anyone come across the similar problem? Thanks a lot for any help -A (3 Replies)
Discussion started by: aoussenko
3 Replies
7. Programming
I'm relatively new to Pro*C programming. In the following example:
char name; EXEC SQL SELECT 'John Doe' INTO :name FROM DUAL;
"John Doe" is in positions 0-7, blanks in 8-19, and a null in 20. I would really prefer the null to be in position 8 and I don't care what's after that. I wrote a... (1 Reply)
Discussion started by: ebock
1 Replies
8. UNIX for Advanced & Expert Users
hello i'm trying to figure out how to number a blank line. For instance this :
sed '/./=' file | sed '/./N; s/\n/ /'
gives me
1 aaaa
2 bbbbbb
4 cccccc
5 ffkkkfff
6 ffsdfdfs
I would like something like this:
1 aaaaa
2
3 bbbbbb
4
5 cccccc
And so... (6 Replies)
Discussion started by: wisher115
6 Replies
9. Shell Programming and Scripting
I have a file with a list of filenames. I want to work loopwise through the file and operate on each of the listed files. Normally I'd do something like:
for file in `cat $mydir/file-list`
do
echo $file >> $mydir/my.log
cp $mydir/$file $newdir
done
the problem is that my... (1 Reply)
Discussion started by: LisaS
1 Replies
10. Shell Programming and Scripting
i have a variable in a bash shell script called $hostname.
$hostname will always be different except it will always start with "-s " that is a - an s and a space. so echo $hostname
will look like this:
-s somehostname.com
how can i get rid of the leading -s ? ive tried tr -d but that gets... (2 Replies)
Discussion started by: norsk hedensk
2 Replies