9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to calculate std dev for a list of files and then print the output appended to an existing file.
I have a few folders within the directory Folder, and I am interested in getting the std dev of values in files named as time.txt. In the last pipe, if I print just the sd value, it... (1 Reply)
Discussion started by: jamie_123
1 Replies
2. Shell Programming and Scripting
hello all,
First time post here. I have searched a bit but could not find an exact answer. I have about a week's experience of Sed and Awk, and am having fun, but am a little stuck.
I am reformatting an xml file into json format. I have got this far:
{"clients":
...and so on. What I want... (22 Replies)
Discussion started by: singerfc
22 Replies
3. Shell Programming and Scripting
Hi guys,
I have a script from which I would like its standard output results (upon execution) to be appended to a separate file (.txt format). How can I write such a command into the script for this to occur? I know there should be a >> involved somewhere.
Thanks! (5 Replies)
Discussion started by: jjb1989
5 Replies
4. Shell Programming and Scripting
Hello Friends,
I'm trying to save process status of root user sorting by CPU usage. However i couldnt save the continuous, standard outputs into a file. Do you have any idea to do it?
prstat -u root -a -s cpu | sed -e '/^$/d;/sleep/d;/Total/d' >> stat.txt
>ls -l stat.txt
-rw-r--r-- 1... (1 Reply)
Discussion started by: EAGL€
1 Replies
5. UNIX for Dummies Questions & Answers
If I want to cat one file and have the output inserted into a specific place on another file, how is this done? I know how to append >> and to overwrite > but say I have a file with:
File1:
abc
def
ghi
jkl
And a File with:
File2:
mno
pqr
stu
vwx
And I want to place the... (5 Replies)
Discussion started by: glev2005
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I'm quite stuck with what I thought should've been simple but I just can't seem to do it. Firstly, I have the following done in bourne shell:
cat datafile | tr '' '' >> newfile
echo "$fullfilepath" >> newfile
i want to have the output of that echo put on the same line as the output... (4 Replies)
Discussion started by: Darkst
4 Replies
7. Shell Programming and Scripting
i am trying to append a 5 line SGML file(file1) with a 500,000 line SGML file (file2).
file1 is a template, so i wish to preserve.
i only want to add lines 5 to the end of file2.
i have:
cp file1 temp1
sed -n '5,$p' file2 >> temp1
when i check the tail of temp1, i consistantly find the... (3 Replies)
Discussion started by: smac
3 Replies
8. Shell Programming and Scripting
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Discussion started by: ali hussain
5 Replies
9. UNIX for Dummies Questions & Answers
:confused:
I have a script that Cats a flat database file which contains 12 columns into sed. I want to add a 13th column which includes " ,2005-08-29 " * The date needs to be the current date.
This 13th column would be appended to the end of each line.
Does anyone have a clue... (5 Replies)
Discussion started by: Redg
5 Replies