9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am having problem while redirecting output to a file where as on console output is proper.
for dir in */; do printf "%s, " "$dir"; ls -m "$dir"; echo; done > output.txt
Output of above command is coming in single line but when i am redirecting output to a file, single line i... (10 Replies)
Discussion started by: Manoj Rajput
10 Replies
2. Shell Programming and Scripting
HI
I am trying to grep 3 characters from hostname and append a character at the end.
I tried as in the following:
root@abag3:~# hostname | cut -c1-3
hyu
Now I am trying to append "g" at the end of this output as in the following.
root@abag3:~# hostname | cut -c1-3 | sed -s... (4 Replies)
Discussion started by: Priya Amaresh
4 Replies
3. Shell Programming and Scripting
I have a table with one column
File1.txt
1
2
3
4
5
6
7
8
9
10
Another table with two columns; This has got a subset of entries from File 1 but not unique because they have differing values in col 2.
File2.txt
1 a
2 d
2 f
6 r
6 e (3 Replies)
Discussion started by: cs_novice
3 Replies
4. Shell Programming and Scripting
Hi All,
I have an input file containing data as below:
Input.DAT
XXXXXXX|YYYYYYY|ZZZZZZZZZZ|12334446456|B|YY|111111111|111111111|111111111|111111111|15|3|NNNNNN|Y|3|AAA|111111111... (11 Replies)
Discussion started by: sagar.cumar
11 Replies
5. Shell Programming and Scripting
I have a file that contains records in the below format:
23857250998423948239482348239580923682396829682398094823049823948
23492780582305829852095820958293582093585823095892386293583203248
23482038509825098230958235234230502958205983958235820358205892095... (10 Replies)
Discussion started by: shellhelp
10 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have 1000 files names data1.txt through data1000.txt inside a folder. I want to write a script that will take each first line from the files and write them as output into a new file. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
7. Shell Programming and Scripting
I'm running long integrations on a remote server, and I'm working in terminal in a tcsh shell.
I'm looking to write ONLY the timing statistics to a file.
For example:
$time ls >timer.out
writes both the files in my current directory & the timer statistics to the file timer.out.
I only... (2 Replies)
Discussion started by: elemonier
2 Replies
8. Shell Programming and Scripting
Hi All,
Please help me writing the below script.
I have two sql queries.
1. Select count(1),Client_id from TABLE_A group by Client_id;
2. Select count(1),Client_id from TABLE_B group by Client_id;
I need the output of above two sql queries in a single file. The output 2nd query should be... (4 Replies)
Discussion started by: 46019
4 Replies
9. Shell Programming and Scripting
Hi,
I am trying to do the following using AWK program.
1. Read the input data file
2. Parse the record and see if it contains errors
3. If the record contains errors, then write it into Reject file, else, write into usual output file or display it on the screen
Here is what I have done -... (6 Replies)
Discussion started by: vidyak
6 Replies