The extra brackets in your code would prevent it from working.
yes I thought that was what you meant for the code. I placed brackets around it. I don't understand what you mean by code tags That is why I used the brackets for code tags. do you know what I could do to get it to work with a date without the brackets as I have it working I just need a date where the xxx is?
---------- Post updated at 05:46 PM ---------- Previous update was at 05:37 PM ----------
Currently the ouput file looks like this but I need a date where the xxxx is
Using CODE tags is not that difficult and you have been given the following directions on how to use them before:
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
The UNIX and Linux Forums
Please click on the tutorial above, or edit this message so you can see how CODE and ICODE tags can be used properly (CODE tags for full-line and multi-line sample input, sample output, and code segments; ICODE tags for partial line sample input, sample output, and code segments).
Last edited by Don Cragun; 01-26-2017 at 11:37 PM..
I'm confused. You say that your output looks like your input file. And since nothing in your code makes any modifications to that input file (it adds some text at the start of the output file and copies that text to the end of the output), why don't you just change the XXXXX in the 1st line of the file named new.txt to be the date string that you want to copy into your output file? Are you saying that the for loop before the cat in the pipeline in your script does not find any files to add any data to your output?
And, exactly what date string format did you want to use instead of the XXXXX that is current in new.txt and, unless the date string you want is the current date and time when your script is run, where is that date string supposed to be found?
I need to shred and delete a file after a certain time. Therefore I use
shred -z /path/to/file.txt | rm -rf /path/to/file.txtIt works well, but typing
in that very directory
ls -shiI still see the so called backup-copy lets say file.txt~
When running bleachbit it will disappear thoroughly.... (3 Replies)
Hello, I have an error when I include the socket.h linux header and compile with gcc.
In file included from /usr/include/sys/socket.h:40:0,
/usr/include/bits/socket.h:217:5: error: expected identifier before numeric constant
#include... (4 Replies)
Hi all first post here.
quick question what Solaris 10 update level included this utility?
I have a bunch of Sun boxes at varying levels of Solaris 10 some have it some do not.
When I do my install I take the full option for the packages to install on all the systems.
thanks in advance... Mike (4 Replies)
I need to do an add function but it should include the prefixed zeros
j=`expr $i + 1`
The output it shows is 124 but I want the output to be 00124
Could any one help me finding out how to do this
Thanks (16 Replies)