Search Results

Search: Posts Made By: Mr_Plow
37,411
Posted By Mr_Plow
Works a treat, thanks very much. I usually...
Works a treat, thanks very much.

I usually look at awk and feel a bit ill ;)
37,411
Posted By Mr_Plow
Using shell to get the last character in a line
Good day ladies and gents,

I'm trying to write shell code that can give ignore everything else in a line bar the last character but not having much luck.

Any ideas? I have been looking at cut...
3,529
Posted By Mr_Plow
For the awk command I didn't get an error message...
For the awk command I didn't get an error message but it didn't do what I wanted.

However, I've played around with the code you provided and I got it to work accordingly.

Thanks.
3,529
Posted By Mr_Plow
I tried the code above but it didn't trim the...
I tried the code above but it didn't trim the last 3 lines of the file.
3,529
Posted By Mr_Plow
Using sed with variables (again!)
Hi,

I'm trying to use sed to delete the last three lines of a file. I currently have:


# get the amount of lines in the file
foldernum=`wc -l File_In.txt | cut -c1-8`
# remove the lines in...
4,729
Posted By Mr_Plow
I exited shell, and started it again and got it...
I exited shell, and started it again and got it to work, not entirely sure why it didn't work before, but it does now!

Thanks for the assistance, it does exactly what I want it to now. :b:
4,729
Posted By Mr_Plow
Gave that a try but didn't work. Thanks for the...
Gave that a try but didn't work. Thanks for the help though.



Tried echo "$VAR" | sed -e 's/\\/\\\\/g' -e 's/.*/s%&%%g/' | sed -f - file.txt >file_processed but got the error sed: newline or...
4,729
Posted By Mr_Plow
Problem passing a specific variable to sed
Hi, I'm a bit of sed n00b here.

My issue is as follows:

I'm trying to pass a variable to sed so that all instances of this variable (in a text file) will be replaced with nothing. However, the...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy