10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello expert friends,
I'm writing a script to capture stats using sar and stuck up at report generation.
I have around 10 files in a directory and need to merge them all vertically based on the time value of first column (output file should have only one time value) and insert comma after... (6 Replies)
Discussion started by: prvnrk
6 Replies
2. Shell Programming and Scripting
I have a file that i want to take only the first part of it and discard the rest, to be accurate,I need the first 137097 lines but I cant use split because I dont have enough space on my disck. I need sth to cut the file in its place (3 Replies)
Discussion started by: Heidi Heweidy
3 Replies
3. Shell Programming and Scripting
Dear all:
I have a file:
1:00 2:abc 3:12asweand I ran the following awk script on this file:
#!/usr/bin/awk -f
{ i= 1;
while(i<=NF) {
$i=substr($i, 1, index($i, ":")-1);
i++
}
}I am expecting the file would become (after running... (7 Replies)
Discussion started by: littlewenwen
7 Replies
4. Shell Programming and Scripting
Hi All,
Could anyone please help me, how to put ‘,' character after 3 digits from right to left count,among 17 digits sting. unix scripting
Example - I am having 12345678911234567 digits
Accepted result-- 12,345,678,911,234,567
Note- 12345678911234567 digits will be dynamic at run time, I... (13 Replies)
Discussion started by: krupasindhu18
13 Replies
5. Shell Programming and Scripting
Hi,
This is most likely a dumb question but I could not find answer to it elsewhere.
I'm building a simple menu with case /esac and want to read user's input:
Please enter XYZ ; read XYZ
How do I take the value of XYZ and insert it as a variable $XYZ in file file.txt ?
I may need to... (9 Replies)
Discussion started by: svetoslav_sj
9 Replies
6. Shell Programming and Scripting
Hi friends,
I am looking for a line to find a particular string in my file and once found then replace with 2-3 blank lines before the string
Example:
aaa 11 bbb
1
2
3
aaa 22 bbb
4
5
6
Output (4 Replies)
Discussion started by: shaliniyadav
4 Replies
7. Shell Programming and Scripting
Hi,
I have a simple question:
I need to enter some text in a text file at a certain place via perl.
I would first need to find that specific text in the file and then I would like to insert a line after that particular line.
Say I have this text file:
I am a great Perl Programmer
I... (1 Reply)
Discussion started by: som.nitk
1 Replies
8. Shell Programming and Scripting
Hi all,
I want to insert a string in a specified place of a very large file. I am giving an example of the task:
I love football.
Above is a sentence in a file and I want to insert a string "the" between love and football. It is not sure that where this particular line exists. It has to... (4 Replies)
Discussion started by: naw_deepak
4 Replies
9. UNIX for Dummies Questions & Answers
I have many scripts in directories and sub-directories that I would like to search for a specific string. How would I do that? (1 Reply)
Discussion started by: bggibson
1 Replies
10. Shell Programming and Scripting
How to grep a string in two different files,
I am having the following scenario
TextFile1
Date (dd/mm)Time Server IP Error Code
===========================================================================
10/04/2008 10:10 ServerA xxx.xxx.xxx.xxx ... (15 Replies)
Discussion started by: karthikn7974
15 Replies