9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello, there.
I'm a new beginner to Linux kernel and curious about its memory management.
When multiple applications apply for memory space at the same time, how Linux kernel solve the resource contending problem for high performance?
I have known that there is a buddy system for allocating and... (4 Replies)
Discussion started by: blackwall
4 Replies
2. Shell Programming and Scripting
I have a very inefficient awk below that I need some help improving. Basically, there are three parts, that ideally, could be combined into one search and one output file. Thank you :).
Part 1:
Check if the user inputted string contains + or - in it and if it does the input is writting to a... (4 Replies)
Discussion started by: cmccabe
4 Replies
3. Shell Programming and Scripting
I've got this program set up so that it creates files whose unique names specify the jobs their contents describe. In order to retrieve the information inside those files, I have to do a "grep" and awk or sed to extract it. I've just assumed that making a directory with that unique name that... (1 Reply)
Discussion started by: gmark99
1 Replies
4. Shell Programming and Scripting
I have the following awk one-liner I came up with last night to gather some data. and it works pretty well (apologies, I'm quite new with awk, and don't know how to format this pretty-printed). You can see the output with it.
awk '{if ($8 == 41015 && $21 == "requests") arr+=$20;if ($8 == 41015... (3 Replies)
Discussion started by: DeCoTwc
3 Replies
5. Shell Programming and Scripting
Hi,
I have a script which looks like this.
Input file
data1^20
data2^30
#!/bin/sh
file"/home/Test.txt"
while read line
do
echo $line |awk 'BEGIN { FS = "^" } ; { print $2 }'
echo $line |awk 'BEGIN { FS = "^" } ; { print $1 }' | gzip | wc -c
done <"$file"
How can i... (4 Replies)
Discussion started by: chetan.c
4 Replies
6. Shell Programming and Scripting
Hello Everyone!
I am a newbie. I'd like to get key lines from a big txt file by Reg Exp, The file is nearly 22MB.
GREP or SED?which may be the best choice,more efficient way?
or any other best practise?
Thank you in advance.
Ever:) (5 Replies)
Discussion started by: ever
5 Replies
7. Shell Programming and Scripting
Hi
I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it
The code is that:
{
if (NF==17){
print $0
}else{
fields=NF;
all=$0;
while... (2 Replies)
Discussion started by: fate
2 Replies
8. Shell Programming and Scripting
I have the following Perl snippet:
# get datetime
@dt = gmtime();
$strdate = 1900 + $dt . addleadingzero(++$dt) . addleadingzero($dt) . addleadingzero($dt) . addleadingzero($dt) . addleadingzero($dt);
# write to file
$outfile = $strdate . ".txt";
getstore($url, $outfile) or die "Error:... (3 Replies)
Discussion started by: figaro
3 Replies
9. Shell Programming and Scripting
how efficient is it, and how practical is it to call outside programs in a shell script (bash) for small tasks?
for example, say i have a script that might preform many tasks, one of those tasks may require root access; rather than implementing inside the script a method to use su or sudo to... (11 Replies)
Discussion started by: norsk hedensk
11 Replies