03-14-2010
Thanks.
Getting closer, however, the 04 was replaced with just 3, that will not work due to the change in format of filename
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all!
Looking for some help parsing filenames in bash. I have a directory full of files named "livingroom-110111105637.avi". The format is always date and time (yymmddhhmmss). I'm looking to parse the filenames so they are a little more easily readable. Maybe rename them to... (4 Replies)
Discussion started by: mtehonica
4 Replies
2. Shell Programming and Scripting
Hi,
I have the following requirement.
There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"
I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies
3. Shell Programming and Scripting
Hi,
I would like to add a suffix to a file name but maintain the suffix length to 5 digits.
For eg,
output > 1st_file.00001, 2nd_file.00002...10th_file.00010....100th_file.00100
Can anyone please advise me on how to go about it?
Platform: SunOS mps201a 5.9 Generic_118558-39 sun4u... (7 Replies)
Discussion started by: danish0909
7 Replies
4. Shell Programming and Scripting
Hi all.
I am very new to linux scripting and i have a task i can only solve with a script.
I need to sort files base on the date string in their filenames and create a folder using the same date string then move the files to their respective folders.
Scenario:
Folder Path:... (1 Reply)
Discussion started by: ace47
1 Replies
5. Shell Programming and Scripting
Hi all.
I am very new to linux scripting and i have a task i can only solve with a script.
I need to sort files base on the date string in their filenames and create a folder using the same date string then move the files to their respective folders.
Scenario:
Folder Path:... (1 Reply)
Discussion started by: ace47
1 Replies
6. Shell Programming and Scripting
I have a bunch of files, they have spaces! I am working in windows 7, but I am hoping I could install and use cygwin or some other unix platform to rename my files (suggestions welcome).
The files are named:
Wind Attn Vol - 474.wrl
Wind Attn Vol - 475.wrl
Wind Attn Vol - 476.wrl etc..
I... (10 Replies)
Discussion started by: d_sai_kumar
10 Replies
7. Shell Programming and Scripting
I have written a script which works fine, to remove patterns contained in EXCLUDE.DAT from input.txt
awk 'BEGIN {n=0;while (getline < "EXCLUDE.DAT" > 0){ex=$0;n++}} {for(var in ex){print var "-" ex $0 ;i++}}' input.txt
The last problem I need to solve is how to pass the file... (3 Replies)
Discussion started by: nixie
3 Replies
8. Shell Programming and Scripting
If i'm given a string like "abc-def-1.2.3", how would I return "1"? I'm new to scripting and got stumped on this problem. Thanks in advance! (7 Replies)
Discussion started by: atsim
7 Replies
9. UNIX for Beginners Questions & Answers
Hello.
Source file are in : /a/b/c/d/e/f/g/some_file
Destination is : /d/e where sub-directories "f" and "g" may missing or not.
After copying I want /a/b/c/d/e/f/g/file1 in /d/e/f/g/file1
On source /a is top-level directory
On destination /d is top-level directory
I would like... (2 Replies)
Discussion started by: jcdole
2 Replies
10. Shell Programming and Scripting
I need to cat two files with similar names. I am using the following script:
#!/bin/bash
if ]
then
file=$1
file2="${file%R1.fastq}R2.fastq"
echo fetching data from R2 file ...
sleep 3
cat $file $file2 > infile
else
echo "Input_file passed... (2 Replies)
Discussion started by: Xterra
2 Replies
SEGEDIT(1) General Commands Manual SEGEDIT(1)
NAME
segedit - extract and replace sections from object files
SYNOPSIS
segedit [ option ] name ... input_file [-extract segname sectname filename] ... [[-replace segname sectname filename] ... -output out-
put_file]
DESCRIPTION
Segedit extracts and or replaces the named sections from the input_file and creates an output_file (if replacing a section). The segment
and section names are the same as specified to ld(1) with the -segcreate option. The segment and section names of an object file can be
examined with the -l option to otool(1). Only sections in segments that have no relocation to or for them can be replaced (marked with the
SG_NORELOC segment flag) but all sections can be extracted.
The options to segedit(1):
-extract segname sectname filename
Extracts the section specified by the segment name section name pair and places the contents in the specified filename.
-replace segname sectname filename
Will replace the section specified by the segment name section name pair and places and take the new contents for the section from
the specified filename. The -output filename option must also be specified. The resulting size of the section will be rounded to a
multiple of 4 bytes and padded with zero bytes if necessary.
-output output_file
Specifies the output file to create when replacing sections.
SEE ALSO
ld(1), otool(1)
LIMITATIONS
Only mach-O format files that are laid out in a contiguous address space and with their contents ordered in the order of increasing address
can have their segments replaced by this program. This layout is what the link editor produces by default.
Apple Computer, Inc. October 23, 1997 SEGEDIT(1)