10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this END section in an awk script:
END {
for (j in littlebin)
{
print (j, int(log(j)/log(2)) , littlebin)
lbsum+=littlebin
}
for (i in bins)
... (6 Replies)
Discussion started by: treesloth
6 Replies
2. Shell Programming and Scripting
My input is:
hello how are you
my chemistry book is lost
what is up
etc...
And I want the output to be:
you are how hello
lost is book chemistry my
up is what
....
I found an earlier response to a similar question but it was not accurate as it required a certain string length for each line (2 Replies)
Discussion started by: Heidi Heweidy
2 Replies
3. Shell Programming and Scripting
The order of egrep output seems to be as they occur in the file. How do I get the order as requested? For e.g.
file contents:
AAA
EEE
GGG
egrep 'GGG|AAA|EEE' file
gives
AAA
EEE
GGG
instead of
GGG
AAA
EEE (2 Replies)
Discussion started by: madhavb
2 Replies
4. Programming
i used a two-way linked list "node" for the code::
#include<stdio.h>
#include<malloc.h>
void insert();
void reverse();
struct node
{
char c;
struct node *next;
struct node *back;
}*start=NULL;
int main()
{
int n,i; (4 Replies)
Discussion started by: mscoder
4 Replies
5. UNIX for Dummies Questions & Answers
Hello, I am new to awk and I was wandering if I could reverse line and word order from a text file using awk. I figured out how to do them both separately, but can't quite figure out how to mix them.
Example:
Input file:
dog cat mouse
1 2 3
I am new to awk
Output of the awk program:... (3 Replies)
Discussion started by: blink_w
3 Replies
6. UNIX for Dummies Questions & Answers
Hello all,
Wondering if anyone can help me out.
Trying to cut the names out of the /etc/passwd file so that they can be displayed first then last name. I cut them out and put them into variables but cant get them to display side by side after cutting. Anyone able to help a newbie? (1 Reply)
Discussion started by: losingit
1 Replies
7. Shell Programming and Scripting
how can i reverse the line order in text files?
(but total number of the lines is not constant )
for example i have a file like this:
line1
line2
line3
.
.
lineN
i wantto make it like this:
lineN
.
.
.
line3 (26 Replies)
Discussion started by: gfhgfnhhn
26 Replies
8. Shell Programming and Scripting
Hi Everyone....I am new to Unix and BASH programming...I just want to read a string and reverse it and display.....can anyone help me out???? (8 Replies)
Discussion started by: nikhilneela
8 Replies
9. Shell Programming and Scripting
Im trying to develop a shell script that will change the content order of the file.
For example I have a file that says
a
b
c
d
I want to change this to be
d
c
b
a
Im trying to use sed to this by reading the file and then inserting each line at the top
#!/usr/bin/ksh
... (3 Replies)
Discussion started by: MBGPS
3 Replies
10. Shell Programming and Scripting
All
I want to reverse and trim a string using UNIX shell scripts.Iam using Bourne shells. Can you help me? Thanx in advance
Regards
Deepak (5 Replies)
Discussion started by: DeepakXavier
5 Replies