10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Could you please advise what is the best way to edit a file without disrupting the spaces?
For example: I have within my file the value below, wherein I wanted to change VALUE2 to VALUETEST.
The total characters on the field of VALUE2 is 15 characters.
VALUE1|VALUE2<9 spaces>|VALUE3
but... (3 Replies)
Discussion started by: asdfghjkl
3 Replies
2. Shell Programming and Scripting
Example:
while read line
do
stat -c %G $line
done < somefile.txtThe problem is that inside somefile.txt lines can have any symbol allowed as file name, like (). Even with spaces, it splits the words.
somefile.txt:dira/my first jump.avi
dirb/surf video (1080p).mkv (2 Replies)
Discussion started by: Tribe
2 Replies
3. Shell Programming and Scripting
Hello All ,
1. I am trying to do a task where I need to remove Blank spaces from my file , I am usingawk '{$1=$1}{print}' file>file1Input :-
;05/12/1990 ;31/03/2014 ;
Output:-
;05/12/1990 ;31/03/2014 ;This command is not removing all spaces from... (6 Replies)
Discussion started by: himanshu sood
6 Replies
4. AIX
Dear Gurus
Can you please advise me on how to Replace all TAB characters with white spaces in a text file in AIX?
Either using vi or any utilities (2 Replies)
Discussion started by: tenderfoot
2 Replies
5. Shell Programming and Scripting
A file contains: abcdef
I need : a b c d e f
It's easy with sed
sed 's/./& /g'but this is embedded linux that doesn't have sed/awk. The shell is unknown but it's bashlike. Parameter expansion works and seems promising and. A question mark seems to work as a wildcard, but there doesn't seem... (5 Replies)
Discussion started by: fubaya
5 Replies
6. UNIX for Dummies Questions & Answers
Is there an awk, sed, vi or any line command that adds Field Separators (default spaces) to each line in a file?
$cat RegionalData
12FC2525MZLP8266900216
12FC2525MZLP8266900216
12FC2525NBLP8276900216
12FC2525NBLP8276900216
Desired results:
1 2 F C 2525 MZ LP 826 690 02 16
1 2 F C... (2 Replies)
Discussion started by: MS75001
2 Replies
7. UNIX for Dummies Questions & Answers
I have a file where in some records are having the <Start> and <End> tag. There is data before the start tag , between the tages and after the End tag. I want to replace everything between the start & end tag with equivalent spaces.
Input File
afsdfaksddfs<start>12678<end>sgdfgdfsf... (6 Replies)
Discussion started by: varunrbs
6 Replies
8. Solaris
what my code is doing, it is executing a sql file and the resullset of the query is getting stored in the text file in a fixed format. for that fixed format i have used the following code::
Code:
awk -F":"... (2 Replies)
Discussion started by: priyanka3006
2 Replies
9. UNIX for Dummies Questions & Answers
Anybody can help me
How can I replace only four first white spaces with , or any other characters
aaaa 08/31/2004 08/31/2009 permanent Logical Processors in System: 64
bedad 08/16/2001 08/15/2011 permanent Logical Processors in System: 64
badnv14 05/31/2008 05/30/2013 permanent Logical... (5 Replies)
Discussion started by: pareshan
5 Replies
10. Programming
I am very new to C programming.
How could I write a C program that could count the characters, words, spaces, and punctuations in a text file?
Any help will be really appreciated. I am doing this as part of my C learning exercise.
Thanks,
Ajay (4 Replies)
Discussion started by: ajay41aj
4 Replies