When I try the code suggested by vidyadhar85, pamu, Yoda, and anand.shah, I don't end up with anything that looks close to the output requested:
The following code seems to replace the contents of file (as specified in the original posting in this thread) with the output requested above:
Last edited by Don Cragun; 06-20-2013 at 03:36 AM..
Reason: Add missing ).
This User Gave Thanks to Don Cragun For This Post:
In the kornshell you can get the length of a string with
$ x=abc
$ print ${#x}
3
If the current locale is a multibyte locale, like de_AT.UTF-8, you get the length of the string in bytes, not characters:
$ x=für
$ print ${#x}
4
Is there an easy way to get the length of a... (8 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Why does this work:
awk -v s="this is a string" 'index($0, s)' file
while the following doesn't?
s="this is a string"
awk -v s=$s 'index($0, s)' file
How do I search for a string with spaces in it?
---------- Post updated at 01:18 AM ---------- Previous update was at 01:15 AM ----------... (0 Replies)
sed -e 's/console/raw/g'
this command will replace the letter pradeep with rawat
what if i want to replace a word like FRIENDS with a space simultaneously from the same file i m replacing pradeep. im doing this
sed -e 's/console/raw/g' && sed 's/FRIENDS//g'
but i dono why this is not happening. (2 Replies)
Hi I am beginner in writing shell scripting please tell me how to compare a string in Unix shell.
i have two variables in a shell script,
var1="00101 00201 00301 303 401 405"
var2="101 201 301"
i want to compare var1 with var2 . for example if 101 from Var1 present in Var2 or not. similarly... (5 Replies)
Hi
I have a file which has sequences which look like this
>String1
aqwertrtrytytyuuijhgddfghhhghhgjhjhhsswekrkmygppdslxmvbnhkwqalldrtjbllnlnlnnnvc
>String2
qwwerrtyuiopasdfghjmnbvfklzxerbvcwghjjkoowwqerrtggbddqsdfgaqwcxzakjtyugfsdefrtgyhujiknbbbbcdcdcxsxsx zxzxcvcfcdcg
>String3... (5 Replies)
I am trying to execute something like this
file=/tmp/test.txt
firstline=$(head -n 1 $file)
value=`echo $firstline | cut -d'=' -f2`
if
then
echo true
fi
i read the first line of a file, cut to the numeric value in the first line and check if it greater than 2
but for some... (11 Replies)
Hi Gurus,
I need find which file contains certain string in one directory.
when using
cat * |grep "string", I can get the string name but no file name displayed.
I am wondering if there is any option I can use to get which file contains this certain string.
Thanks in advance. (3 Replies)
I apologize if it was asked before but I couldn't find something related.
I want to replace 2 strings in a file
e.g
pwddb=Lar1wod (need to replace string after =)
pwdapp=Wde2xe (need to replace string after =)
AND in same file want to find last occurrence of a string (SR2-134561),... (2 Replies)
Discussion started by: J_ang
2 Replies
LEARN ABOUT DEBIAN
uclean
UCLEAN(1) Command reference UCLEAN(1)NAME
uclean - remove redundant files from upstream source packages
SYNOPSIS
uclean FILE [ NEWFILE... ]
DESCRIPTION
Uclean is an attempt to automate the "cleanup" procedure that can be needed for some package upstream tarballs. It will try to unpack it,
remove cruft like CVS directories, .svn directories and forgotten object files. Then it will recreate the tarball, using the highest
compression ratio. The resulting file is either stored under the same name (the old one is renamed) or as a new file if you specify it as
the last argument.
SEE ALSO
/usr/share/doc/svn-buildpackage/()
The svn-buildpackage HOWTO manual
svn-inject(1)
puts a Debian source package into Subversion repository
svn-upgrade(1)
upgrade source package from a new upstream revision
svn(1)
Subversion command line client tool
dpkg-buildpackage(1)
Debian source package tools
lintian(1)
Debian package checker
AUTHORS
Eduard Bloch
This manual page was written by Eduard Bloch in roff.
Goneri Le Bouder
Converted manpages to SGML.
Neil Williams
Converted manpages to DocBook XML and current Debian maintainer
COPYRIGHT
Copyright (C) 2009 Eduard Bloch
Release: 0.8.2 May 2009 UCLEAN(1)