10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Can you please if the bellow is the proper way of appending a variable to the stderr:
The easiest way to test this,I was able to imagine, was by touching 5 files and afterwards looping trough to the results:
-rw-r--r-- 1 ab owner 0 Sep 14 13:45 file1
-rw-r--r-- 1 ab owner 0 Sep... (7 Replies)
Discussion started by: alex2005
7 Replies
2. Shell Programming and Scripting
Hi Guys,
IF i have to append data to a variable, i simply use the following. What can i do to append data to the beginning?
VAR+="data" (6 Replies)
Discussion started by: srkmish
6 Replies
3. Programming
I am struck in the code of handling multiple files reading and appending it into a variable.
My First file's entire content I have concatenated using strcat(<char pointer>,char array)
In the Second file I extract using strtstr() function and below is the code.
if( fp2 != NULL){
... (2 Replies)
Discussion started by: gameboy87
2 Replies
4. Shell Programming and Scripting
Hi,
I have a variable... it can take a value from 1 to 99...
now when it is 1 to 9 i want to save it as 01 to 09 in the same variable... can this be done using sed or awk???
a=1
i want it as a=01
Thanks in advance... (8 Replies)
Discussion started by: Nithz
8 Replies
5. Shell Programming and Scripting
I want to append values to same string variable inside a recursive function that I have .. I do not want to write to any file but use a variable..
Can anyone please help with it? Thanks in advance. (6 Replies)
Discussion started by: Prev
6 Replies
6. UNIX for Dummies Questions & Answers
I want to build an array using awk, consisting only of a subset of lines of a file. I know how to have awk assess whether a key phrase is in a particular line, but I can't find anywhere how to then append the line containing that phrase to an array that has previously-found lines also containing... (9 Replies)
Discussion started by: pts2
9 Replies
7. Shell Programming and Scripting
Hello-
I have a variable which contains a number, I need to populate number of zeros before another value as per this variable value.
for example:
I have variable X whose content is 5, variable Y whose content is 123
Now append number of zeros as per variable X before varible 'Y'... (4 Replies)
Discussion started by: pasupuleti81
4 Replies
8. Shell Programming and Scripting
Hello all,
I want to use sed to append a variable stored in $i, how do i do that?
$i contains a path to a directory and i want to append it before the result i get from awk statement, before affecting awk results.
rite now out put i get from code below is:-
The path is:... (2 Replies)
Discussion started by: asirohi
2 Replies
9. Shell Programming and Scripting
Hi There!
I'm trying to write a shell script which generates a random hexadecimal number and then appends it to the end of lines XX onwards of a certain file. XX is determined by a certain string on the previous line.
Thus for example, if the input file is
I search for the string... (3 Replies)
Discussion started by: orno
3 Replies
10. Shell Programming and Scripting
I have a file named xyz_extract_file_20091201.dat and I need to strip out 20091201 from the file name and append this value as a first field in all the records in the file. Can you please help? Thanks.
Eg.
Input File: xyz_extract_file_20091201.dat
------------
Campaign1,A2347,Grp_id1... (1 Reply)
Discussion started by: shekharaj
1 Replies