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 am very new to scripting and I know this request is simple but I am having no luck with it.
I have a file a.dat with the following data in it.
aa
bb
cc
dd
I need to run a script that will take each line of a.dat and put dsjc/ubin/ in front of each record, so the output looks like
... (2 Replies)
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (0 Replies)
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (6 Replies)
how to add value/word at the beginning of each line in a file ?
i have file number.txt and the output is below
1000
1001
1002
1003
1004
i want to add 000 at the beginning of each line, desire output is below
0001000
0001001
0001002
0001003
0001004
and so on
please advise how... (5 Replies)
how to add a text ( surya) at the beginning of a text files (so many) in folder
text file:
111111
555555
666666
result:
surya
111111
555555
666666 (3 Replies)
Hi,
I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|".
I am looking for some command/option to join these two in single command parameter.
... (6 Replies)
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
LEARN ABOUT DEBIAN
plan9-cat
CAT(1) General Commands Manual CAT(1)NAME
cat, read, nobs - catenate files
SYNOPSIS
cat [ file ... ]
read [ -m ] [ -n nline ] [ file ... ]
nobs [ file ... ]
DESCRIPTION
Cat reads each file in sequence and writes it on the standard output. Thus
cat file
prints a file and
cat file1 file2 >file3
concatenates the first two files and places the result on the third.
If no file is given, cat reads from the standard input. Output is buffered in blocks matching the input.
Read copies to standard output exactly one line from the named file, default standard input. It is useful in interactive rc(1) scripts.
The -m flag causes it to continue reading and writing multiple lines until end of file; -n causes it to read no more than nline lines.
Read always executes a single write for each line of input, which can be helpful when preparing input to programs that expect line-at-a-
time data. It never reads any more data from the input than it prints to the output.
Nobs copies the named files to standard output except that it removes all backspace characters and the characters that precede them. It is
useful to use as $PAGER with the Unix version of man(1) when run inside a win (see acme(1)) window.
SOURCE
/src/cmd/cat.c
/src/cmd/read.c
/bin/nobs
SEE ALSO cp(1)DIAGNOSTICS
Read exits with status eof on end of file or, in the -n case, if it doesn't read nlines lines.
BUGS
Beware of and which destroy input files before reading them.
CAT(1)