10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm new with sed, and i am really confused with slashes, backslashes, parentheses, I've tried reading some beginner's guide, but still trouble fixing this problem, do you have any tips where or what to read to learn more about sed? can you also help me with my problem?
Note: I was tasked to use... (4 Replies)
Discussion started by: akopocpoypoy
4 Replies
2. Shell Programming and Scripting
Hi I was hoping someone could help me with a sed script I am trying to write? I am on a Mac running ElCapitan
I have some text that I have converted from a pdf that I want to format into an xml file.
In the file I have managed to delete all the text I do not need. The text I have left is... (8 Replies)
Discussion started by: Paul Walker
8 Replies
3. Shell Programming and Scripting
Hi,
I have one input file which is delimited by pipe. I want to put decimal points in this input file at particular position in particular column and also get the negative sign (if any) at start of that column.
$ cat Input_file.txt
11|10102693|1|20151202|10263204|20151127|N|0001... (7 Replies)
Discussion started by: Prathmesh
7 Replies
4. UNIX for Dummies Questions & Answers
Dear all,
I have a data test.txt as below.
X22.30799720_T cg03868770 -0.5645412582127 2.4084685750406e-175
X22.30781182_A cg03868770 -0.5620426397492 3.5818034129169e-172
X22.30780724_C cg03868770 -0.5616890165605 2.9765569717858e-168
what I want is:
X22.30799720_T cg03868770... (3 Replies)
Discussion started by: forevertl
3 Replies
5. Shell Programming and Scripting
Hi All,
I have problem in the middle of implementing to users, whereby the complaint is all about the decimal place which is too long. I need two decimal places only, but the outcome from command is always fixed to 6.
See the sample :
before:
Sort Total
Site Sort SortName Parts ... (3 Replies)
Discussion started by: horsepower
3 Replies
6. Shell Programming and Scripting
I am trying to count the number of records from different files using grep, and then place the result in a separate variable for each file, so at the end of my shell script, I can sum all the variables and check if the number of records are equal to what I was expecting. It is weird butwc -ldoes... (2 Replies)
Discussion started by: dhruuv369
2 Replies
7. Shell Programming and Scripting
I have written a script to parse data from some files on a Solaris 10 system and send the output to a CSV formatted file. The code snipped i am using to pull the data is as follows....
src_line=$(sed -n "/^search_pattern$/{=;}" $file)
for i in $src_line
do
start_line1=$(( i + 9 ))
nawk -v... (4 Replies)
Discussion started by: electricheadx
4 Replies
8. Shell Programming and Scripting
I am trying to add 0393 value at 24th feild using the below command, but its adding at all the lines including header and trailer
Input file:
ZHV|2657|D0217001|T|TXU|Z|PAN|20131112000552||||OPER|
754|52479|
492|489|SP40|1014570286334|20131111|20131201|14355334|CHAMELON... (1 Reply)
Discussion started by: Aditya_001
1 Replies
9. Shell Programming and Scripting
Hi,
I lack the utter fundamentals on how to craft an awk script.
I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Discussion started by: n00ti
3 Replies
10. Shell Programming and Scripting
Hi All,
I want to read one number from the file.
Only one number will be there in the file.
then i have to increment the number in my script and put it back in the same file.
Is it possible?
Can anybody help me?
Thanks,
Vinay (6 Replies)
Discussion started by: vinayakatj56
6 Replies