10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
i want to create a sha256 hash for a file and copy the source file under new filename as :
sha256hash_sourcefilename
Input : sha256sum FILE
Example : sha156sum mounttest.123
Output HASH_FILE
How to do this ?
e.g.:
... (1 Reply)
Discussion started by: bdittmar
1 Replies
2. Shell Programming and Scripting
Hi All,
How I can paste contain big file1 to end another file2, e.g.,
$cat file1
aaaaa
bbbbb
ccccc$cat file2
11111 22222 3333 4444
55555 66666 7777 8888then want like
paste contain file1 to end file2 > file3
$cat file3
aaaaa
bbbbb
ccccc
11111 22222 3333 4444
55555 66666... (4 Replies)
Discussion started by: aav1307
4 Replies
3. Shell Programming and Scripting
Hi,
i have some files which looks like given below:
-rwxrwxrwx 1 amsbatch ams 1608 Oct 22 2009 AMS_BATCH_COMPILE*
-rwxr----- 1 amsbatch ams 1608 Oct 22 2009 AMS_BATCH_COMPILE_original*
-rwxrwxrwx 1 amsbatch ams 1127 Dec 1 2005 AMS_LMU.sh*
drwxr-xr-x 2... (3 Replies)
Discussion started by: mann2719
3 Replies
4. Shell Programming and Scripting
Hi
I have a cron job setup that searches for 'core dump' files in a fixed set of directories and moves the core files to a separate file system.
I am able to add date and time info to the file name.
How can I add the source directory path to the file name?
In case anyone is wondering why I... (5 Replies)
Discussion started by: dexter126
5 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to make a script that copy a file that has a backslash in the filename.
What I'm doing wrong?
The flename is: 1300212744.H786972P30819.ns1.cybernet.com.br,S\=6313:2,
My script
ParteA="1300212970.H27173P31627.ns1.cybernet.com.br,S"
ParteB=\\
ParteC="="
ParteZ=":2,"... (15 Replies)
Discussion started by: Ronaldo
15 Replies
6. UNIX for Dummies Questions & Answers
I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell.
I am able to create files with special characters in the filenames...e.g.
cp -pv foo.gif \*special.gif
cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies
7. Shell Programming and Scripting
Hello, I have a file path such as: /path/to/whatever/30 and I want to get the number off the end. My problem is that there might be other numbers in the path and the last number can be 1 or 2 digits. I tried something like: sed 's/.*\(\/\{1,2\}\).*/\1/' which seems to work fine for single digit... (7 Replies)
Discussion started by: phreezr
7 Replies
8. Shell Programming and Scripting
Hi,
This is my first post here - I'm hoping I can get some help! I have searched these forums and othersand not getting anything that works.
I am trying to extract a single file from a tar archive to a diffierent location than it will default to.
For example my tar log shows me ...
a... (3 Replies)
Discussion started by: littleIdiot
3 Replies
9. Shell Programming and Scripting
Hi,
I'm reading data from comma separated files to DB. Now there is a need to have the name of the input file in each row of that file. How can I do this in unix script?
Example:
$cat file1
value11,value12, value,13
value21,value22, value,23
value31,value32, value,33
And the result... (2 Replies)
Discussion started by: tmikahan
2 Replies
10. Shell Programming and Scripting
Hi,
I have 24 .dat files something like below. The file name starts with “abc” followed by two digit month and two digit year. Is there a way to grab the month and year from each filename and append it to the end of each line. Once this is done I want to combine all the files into file... (1 Reply)
Discussion started by: rkumar28
1 Replies