10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies
3. Programming
performing this code to read from file and print each character in separate line
works well with ASCII encoded text
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int... (1 Reply)
Discussion started by: khaled79
1 Replies
4. Shell Programming and Scripting
Hi all
i want to write program with shell script that able compare two file content and if one of lines of file have # at the first of string or nothing find same string in one of two file . remove the line in second file that have not the string in first file. for example:
file... (2 Replies)
Discussion started by: saleh67
2 Replies
5. Shell Programming and Scripting
I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field.
example input line:
... (1 Reply)
Discussion started by: erlanq
1 Replies
6. Shell Programming and Scripting
I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field.
example input line:
... (2 Replies)
Discussion started by: erlanq
2 Replies
7. Shell Programming and Scripting
Hi Unix gurus,
I am facing a problme with file. I need separate my file into multiple line.
eg.
Soure file: PRT07, aaa, bbb, 46, PRT06, ccc, ddd, 57, PRT05, eee,fff,aa,
target file:
PRT07, aaa, bbb, 46
PRT06, ccc, ddd, 57
PRT05, eee,fff,aa
:wall:
thanks in advance (4 Replies)
Discussion started by: ken002
4 Replies
8. Shell Programming and Scripting
I have one line files with 17 records separated by a semi-colon. I need to create a variable from each record, which I can do via a separate awk for each one, but I know there has to be a better way. Along with pulling out the variable, I need to convert some url coding like a + to a space, etc.... (4 Replies)
Discussion started by: numele
4 Replies
9. UNIX for Advanced & Expert Users
I have a file containing many lines all with varying lengths. I need each line in the file to be 100 characters in width but I can not find a way of doing this. I want to append to each line spaces to bring the width of the line to 100 but I need a generic way to work out how many spaces I need.
... (2 Replies)
Discussion started by: dbessell
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to list all the words in my file on a separate line.
I am using the bourne(sh)/bourne again shell(bash).
Thanks,
theA (2 Replies)
Discussion started by: Astudent
2 Replies