if need to input a word or anything at the beginning of every file in a directory. how do i accomplish this?
say the file is named hyperten. how do i make hyperten the first line of every file in a given directory?
thanks (6 Replies)
Hi,
I have a command "get_data" with some parameters in few *.text files of a directory. I want to first find those files that contain this command and then append the following parameter to the end of the command.
example of an entry in the file :-
get_data -x -m50 /etc/web/getid
this... (1 Reply)
Hello,
I have 50 text files in a directory called "AllFiles"
I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
I want to append file names at the beginning of a line for each row
file content
abc.txt.gz 123|654|987
bcd.txt.gz 876|trf|kjh
I want a single output file with below format
abc.txt.gz|123|654|987
bcd.txt.gz|876|trf|kjh
This one is working but only with unzip files,need to have... (3 Replies)
Hi,
I have multiple files having many lines like as bvelow:
file Name a.txt
abc def
def xyz
123 5678
file Name b.txt
abc def
def xyz
123 5678
I would like to append files in the below format to a new file:
file Name c.txt (7 Replies)
How to pre-append a variable string to each line in a file contains both single and double quotes?
The variable string has no quotes in it.
thank you very much.
:confused: (8 Replies)
Hi,
I now that >> will append text to the end of the text that is already inside the file.
How to append the new text infront of the text that is already in the file.
Thanks for any input.
Regards,
Chandu (3 Replies)
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
LEARN ABOUT SUSE
unshar
UNSHAR(1) General Commands Manual UNSHAR(1)NAME
unshar - unpack a shar file
SYNOPSIS
unshar [ options ] [ file ... ]
DESCRIPTION
Unshar scans mail messages looking for the start of a shell archive. It then passes the archive through a copy of the shell to unpack it.
It will accept multiple files. If no files are given, standard input is used.
OPTIONS
Options have a one letter version starting with - or a long version starting with --. The exception is --help and --version, which does
not have a short version.
--version
Print the version number of the program on standard output, then immediately exits.
--help Print a help summary on standard output, then immediately exits.
-d DIRECTORY --directory=DIRECTORY
Change directory to DIRECTORY before unpacking any files.
-c--overwrite
Passed as an option to the shar file. Many shell archive scripts (including those produced by `shar' 3.40 and newer) accepts a -c
argument to indicate that existing files should be overwritten.
-e--exit-0
This option exists mainly for people who collect many shell archives into a single mail folder. With this option, `unshar' isolates
each different shell archive from the others which have been put in the same file, unpacking each in turn, from the beginning of the
file towards its end. Its proper operation relies on the fact that many shar files are terminated by a `exit 0' at the beginning of
a line.
Option -e is internally equivalent to -E "exit 0".
-E STRING --split-at=STRING
This option works like -e, but it allows you to specify the string that separates archives if `exit 0' isn't appropriate.
For example, noticing that most `.signatures' have a `--' on a line right before them, one can sometimes use `--split-at=--' for
splitting shell archives which lack the `exit 0' line at end. The signature will then be skipped altogether with the headers of the
following message.
-f--force
The same as -c.
SEE ALSO shar(1)DIAGNOSTICS
Any message from the shell may be displayed.
AUTHORS
The shar and unshar programs is the collective work of many authors. Many people contributed by reporting problems, suggesting various
improvements or submitting actual code. A list of these people is in the THANKS file in the sharutils distribution.
REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>. Please put sharutils in the subject line. It helps to spot the message.
September 10, 1995 UNSHAR(1)