10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I am trying to replace a certain value from one place in a file . In the below file at position 35 I will have 8 I need to modify all 8 in that position to 7
I tried
awk '{gsub("8","7",$35)}1' infile > outfile ----> not working
sed -i 's/8/7'g' infile --- it is replacing all... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
2. Shell Programming and Scripting
Hi,
I'm quite new to scripting, but know a few AWK statements.
I have the following line in my script:
hostname=`echo $file | awk 'BEGIN{FS=OFS="."}{$NF=""; NF--; print}'`
I use this in my script to rename files, which are similar to this:
name.mvkf.mkvfm.mkfvm.1
To the... (4 Replies)
Discussion started by: TauntaunHerder
4 Replies
3. Shell Programming and Scripting
Using shell,
I have a variable, how can I check that variable for a numeric value such as "41.0"? My program needs to do one things if the numeric value is found, and another if something else such as a string of letter is found. is there a specific character that denotes a numeral? The... (2 Replies)
Discussion started by: chagan02
2 Replies
4. Shell Programming and Scripting
Hi,
I have a tab delimited file in which first row is the header and others rows has the values.
A B C D
2 4 0.00 3.00
0.00 9.78 4654 898
I have to check whether all the values are zero.
A B C D
0.00 0 0.00 0.00
0.00 0.00 0 0.000
Send mail if all the values in file are zero (4 Replies)
Discussion started by: sandy1028
4 Replies
5. Shell Programming and Scripting
hi
i have two types of file
1. temp.0000000001.data (10 digit numeric)
2. temp.000000001.data (9 digit numeric)
i want to search a file which is having 10 digit numeric in between the file name.
i use command like this..
ls | grep temp.^*.data
but this will give both the files as... (2 Replies)
Discussion started by: somi2yoga
2 Replies
6. Shell Programming and Scripting
Hi,
I want to know, how we find out if a column is having a numeric value or not.
For Example if we have a csv file as
ASDF,QWER,GHJK,123,FGHY,9876
GHTY,NVHR,WOPI,623,HFBS,5386
we need to find out if the 4th and 6th column has muneric value or not.
Thanks in advance
Keerthan (9 Replies)
Discussion started by: keerthan
9 Replies
7. Shell Programming and Scripting
Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL.
Regards,
Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies
8. Programming
I am getting back on the C++ programming after many years away. I recently received an SDK that has code like this where numeric values end in 'U'. What does this mean?
if ((ptr % 16U) == 0U)
return buffer; (3 Replies)
Discussion started by: sneakyimp
3 Replies
9. Shell Programming and Scripting
hi all,
i'm very new to scripting and have the folllowing issue. I have used a few commands to get a list of numbers, but I need to strip away the non-numeric ones, and then need a total of all values. any ideas?
root@unixserver # cat myfile | awk '{print $8}'| sort -rn
1504
1344
896
704... (2 Replies)
Discussion started by: badoshi
2 Replies
10. Shell Programming and Scripting
What could be the regular expression with gsub function in awk to replace all numerics having spaces before to be replaced with 0s? (1 Reply)
Discussion started by: videsh77
1 Replies